<!--
Sitemap:
- [Overview](/index): Introducing Rocky
- [Products](/introduction/products): Stablecoins & Savings
- [Use Cases](/introduction/use-cases): Concrete use cases of Rocky
- [How it Works](/products/how-it-works/): Rocky is a stablecoins protocol allowing the creation of decentralized, capital-efficient and over-collateralized stablecoins built using a modular & upgradabl…
- [Rocketizer Module](/products/how-it-works/rocketizer-module): Explaining the Rocketizer Module
- [Savings Module](/products/how-it-works/savings-module): The Rocky Savings Module allows Rocky stablecoin holders to earn a native yield based on returns generated by the protocol on the assets backing the stablecoin…
- [Flashloan Module](/products/how-it-works/flashloan-module): Flash loans (also called One Block Borrows) are special transactions that allow the borrowing of an asset, as long as the borrowed amount (and a fee) is return…
- [Stablecoins & Savings](/products/stablecoins-and-savings/): Introducing Rocky Stablecoins
- [USDr & sUSDr](/products/stablecoins-and-savings/usdr-and-susdr/): Explaining USDr & sUSDr
- [Implementation](/products/stablecoins-and-savings/usdr-and-susdr/implementation): Detailing current USDr production implementation
- [Fee Distribution](/products/stablecoins-and-savings/usdr-and-susdr/fee-distribution): Rocky generated fees by the USDr codebase are distributed as follow:
- [Licensing](/products/licensing): Rocky is divided into three different repositories, each with its own license:
- [Proof of Solvency](/security/proof-of-solvency): Rocky Proof of Solvency
- [Hypernative](/security/hypernative): Hypernative is a leading real-time security platform that unites alerting and threat prevention with a sharp focus on early detection of on-chain threats and a…
- [Keepers](/security/keepers): Role and responsibilities of Keepers in maintaining Rocky protocol operations
- [Audits](/security/audits): A breakdown of security reviews covering deployed smart contracts of Rocky
- [Multisigs](/security/multisigs): A breakdown of multisigs used in Rocky
- [Introduction](/developers-hub/introduction): [https://github.com/rocky-protocol](https://github.com/rocky-protocol)\ \ TBA
- [Rocketizer Module](/developers-hub/rocketizer-module)
- [Savings Module](/developers-hub/savings-module)
- [Flashloan Module](/developers-hub/flashloan-module)
- [Onchain Tools](/developers-hub/onchain-tools/): A Breakdown of Available Onchain Tools
- [Oracles](/developers-hub/onchain-tools/oracles/): Explore Rocky price feeds deployed by third party protocols.
- [DIA](/developers-hub/onchain-tools/oracles/dia): More details on DIA Oracles
- [Offchain Tools](/developers-hub/offchain-tools/): TBA
- [Dune](/developers-hub/offchain-tools/dune): TBA
- [Build on Rocky](/developers-hub/build-on-rocky/): The goal of these guides is to help developers, such as third-party protocols, arbitrageurs, or keepers; understand and build on-top of Rocky.
- [Rocketizer Module Integration](/developers-hub/build-on-rocky/rocketizer-module-integration): The Rocketizer Module serves as the core minting and burning engine for Rocky stablecoins.
- [Savings Module Integration](/developers-hub/build-on-rocky/savings-module-integration): The Savings module provides a yield-bearing vault system built on the ERC4626 standard, allowing users to deposit Rocky stablecoins and earn interest through a…
- [Flashloan Module Integration](/developers-hub/build-on-rocky/flashloan-module-integration): The Flashloan module serves as the core minting and burning engine for Rocky stablecoins.
- [Addresses](/developers-hub/addresses/): - [USDr](/developers-hub/addresses/usdr): USDr contract addresses on Sei
- [USDr](/developers-hub/addresses/usdr): USDr contract addresses on Sei
- [User Guides](/resources/user-guides): TBA
-->

# Keepers

## What is a Keeper?

A Keeper is a whitelisted actor responsible for performing critical off-chain-to-on-chain operations that cannot be executed automatically in a trustless and non-manipulative manner. Keepers ensure the smooth functioning of several core Rocky mechanisms, including yield rate updates, target oracle maintenance, and reward management.

In the Rocky access control system, keepers are assigned the `KEEPER_ROLE` (role ID `30`), with an associated `KEEPER_ROLE_TIMELOCK` (role ID `31`).

## Responsibilities

### Savings Rate Updates

The yield rate paid by Savings module contracts (e.g., sUSDr) is derived from the returns generated by the protocol on its backing assets. However, this rate schedule cannot be implemented automatically in a non-manipulative way. Keepers are responsible for encoding and updating the inflation rate in the Savings module contracts.

Keepers may follow different update schedules depending on the stablecoin and the setup. The frequency of updates may vary from every week to every several months. Between two updates, depositors in Savings module contracts are guaranteed to earn a fixed rate on their assets.

### Target Oracle Updates

In the Rocketizer Module, each collateral asset has a target price used to assess whether the asset is depegging and whether conservative measures (such as adjusted fees or paused operations) should be taken. Keepers are responsible for updating these target oracles to reflect accurate market conditions. This is essential for the proper functioning of the mint, burn, and redeem operations, as the system relies on the deviation between the oracle price and the target price to determine adaptive fees and depeg protection behavior.

### Reward Management

Certain assets authorized to back USDr generate additional rewards over time. Keepers are responsible for selling these additional rewards to maintain a clean and properly accounted backing for the stablecoin.

## Safety Mechanisms

To prevent any potential keeper from acting maliciously, the protocol implements several safeguards:

* **Maximum Rate Cap**: A maximum possible rate is enforced on each Savings module. For example, the maximum rate for sUSDr has been set at 35.00%. This prevents a keeper from uncontrollably increasing the savings rate.
* **Timelock**: The `KEEPER_ROLE_TIMELOCK` adds a delay mechanism for sensitive keeper operations, providing an additional layer of security.
* **Hypernative Monitoring**: Real-time security monitoring by Hypernative can pause critical contracts if anomalous behavior is detected, adding an independent safety layer on top of keeper operations.

## Addresses

| Blockchain | Address                                                                                                             |
| ---------- | ------------------------------------------------------------------------------------------------------------------- |
| Sei        | [0xd3642B1eb01Fe0A08B63696911c40D80D035ee7a](https://seiscan.io/address/0xd3642B1eb01Fe0A08B63696911c40D80D035ee7a) |
| Sei        | [0x100a545664551868929F9c71a38256dFFc940D02](https://seiscan.io/address/0x100a545664551868929F9c71a38256dFFc940D02) |
