# Decentralized Keepers

## Redstone

Cadence is partnered with Redstone for its decentralized keepers.

* More information about Redstone can be found at: <https://redstone.finance/>

## What are Keepers?

Keepers are automated systems that perform specific tasks on a blockchain network without requiring human intervention.

In particular, keepers can be used to manage decentralized finance (DeFi) protocols by monitoring market conditions and executing transactions when certain conditions are met. This can include tasks such as providing liquidity, settling trades, or even liquidating positions.

Keepers are an important part of the DeFi ecosystem because they allow for automation of complex processes that would otherwise require human intervention, thereby increasing efficiency and reducing costs. Additionally, they can help to prevent market manipulation and ensure a level playing field for all users.

## How are they potentially dangerous in other current perp protocols?

Currently, in other decentralized perp protocols, Keepers are controlled by the team's EOAs. When you make a trade, the keeper actually executes your trade at a price they input. If the keeper price is deviated by 2.5% of the original chainlink price it will create a spread for the transaction.&#x20;

For more details on the potential dangers of this approach, you can read this [great article](https://deri-protocol.medium.com/gmx-a-can-be-evil-amm-5558564b2eea) by 0xAlpha

In a perfect world, keepers allow for efficiency, accuracy of price data, and prevent frontrunning. Cadence in partnership with Redstone, has built a system to keep all these positives without the potentially dangerous centralized nature.&#x20;

## Decentralized Keepers

Our keepers are pointed to a CadenceKeeperAdapter contract built by Redstone. Anyone is able to submit price data to the `setPricesWithBitsAndExecute`Function with an attached signed approved oracle data, which will trigger a secure extraction of oracle data and calling setPricesWithBitsAndExecute on the FastPriceFeed contract. Deep verification of the signed oracle data will be done through the `securelyExtractOracleValuesFromTxMsg` function found [here](https://github.com/redstone-finance/redstone-oracles-monorepo/blob/main/packages/evm-connector/contracts/core/RedstoneConsumerBase.sol#L78), which has all been audited by ABDK and Packshield.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cadenceprotocol.gitbook.io/cadence-protocol/trading-on-cadence-protocol/decentralized-keepers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
