Core Contracts
RheoFI's protocol is structured around three contract types: Market Contracts (one per isolated market), the Controller (global risk parameter registry), and the Oracle Adapter (price feed abstraction).
Market Contract
Each isolated market is a self-contained contract responsible for:
- Accepting supply and tracking rToken balances
- Managing borrow positions and accruing interest
- Executing liquidations via XRPL's native DEX
No state is shared between market contracts. A bug or exploit in one market cannot drain another.
Controller Contract
The Controller stores global parameters: which markets exist, their collateral factors, liquidation thresholds, and supply/borrow caps. Governance proposals modify the Controller.
Oracle Adapter
Rather than hard-coding a single price feed, RheoFI routes all price queries through an Oracle Adapter that can be upgraded without touching market contracts. Current sources: Chainlink (where available on XRPL) and XRPL's own DEX TWAP.
Interest Rate Model
RheoFI uses a kinked interest rate model: rates rise slowly below a target utilization (e.g. 80%) and sharply above it, incentivizing borrowers to repay and keeping liquidity available for withdrawals.
References
- RheoFI Whitepaper โ RheoFI