Contracts Overview
The Rheofi Protocol is composed of a modular set of smart contracts organized into distinct functional domains. This page provides a high-level overview of each contract group and its role within the protocol.
Liquidity Pool Contracts (Isolated Pools)
Isolated Liquidity Pools enable permissionless market creation with contained risk profiles.
- PoolRegistry — The factory and registry for all isolated pools. It manages pool creation, metadata, and the enumeration of active pools and their markets.
- Comptroller (Isolated) — Each isolated pool deploys its own Comptroller instance with independent risk parameters, ensuring that risk does not propagate across pools.
- RToken (Isolated) — ERC-20-compliant interest-bearing tokens representing a user's supplied assets. Each supported asset has a corresponding RToken market (e.g., rUSDC, rETH). RTokens accrue interest per block according to the configured interest rate model.
Administration Contracts
Protocol administration and upgrades are managed through the following contracts:
- Timelock — Enforces a configurable delay between administrative action approval and execution, providing a window for users to react to pending changes.
- AccessControlManager — A role-based access control registry that gates privileged functions across all protocol contracts. Roles are granted per-contract and per-function granularity.
Oracle Contracts
Price feeds are critical infrastructure for collateral valuation and liquidation triggers.
- ResilientOracle — The primary oracle contract that aggregates prices from multiple sources and applies validation logic (pivot, fallback) to ensure feed resilience against manipulation.
- ChainlinkOracle — An adapter that reads prices from Chainlink data feeds and formats them for consumption by the ResilientOracle.
- PythOracle — An adapter for Pyth Network price feeds, offering an additional independent data source.
Token Converter Contracts
Token Converters automate the conversion of protocol revenue into desired assets.
- SingleTokenConverter — Converts accumulated reserve tokens into a target token via a private market mechanism, allowing external participants to fill conversion requests at a protocol-defined exchange rate.
- ConverterNetwork — A registry that tracks all converter instances and routes conversion requests to the appropriate converter.
For detailed API references, navigate into the sub-sections for each contract group.