Oracle - Price Feed Contracts
XRPL Testnet
Core Oracle Contracts
- Chainlink Oracle:
0xD0B01274baEcEF57AB4411128536688168DBf1F6 - Resilient Oracle:
0xA5aa780AD24D0Cf15Bdea40BC7bb0057C79941b6 - Bound Validator:
0xb81f18E74ca6320BC21fD1c6f305b40936226f4C
Oracle Descriptions
Chainlink Oracle
Primary oracle adapter for Chainlink price feeds. Provides reliable, decentralized price data for major tokens including:
- WBTC
- WETH
- USDC
- USDT
- DAI
- FRAX
- CRV
- crvUSD
- weETH
- eETH
- And other supported assets
Chainlink feeds use tamper-proof, off-chain computed prices from a decentralized network of node operators.
Resilient Oracle
Secondary oracle aggregator that provides price resilience by:
- Combining multiple price sources (Chainlink, RedStone, etc.)
- Falling back to alternative sources if primary fails
- Validating prices within acceptable bounds
- Protecting against flashloan attacks and oracle manipulation
Ensures protocol stability by always having a reliable price source available.
Bound Validator
Smart contract that validates oracle prices by:
- Checking price movement bounds (upper and lower limits)
- Preventing extreme price swings that indicate oracle failures
- Enforcing reasonable price deviation ratios between price updates
- Protecting liquidation and risk management systems from exploitation
Maintains price validation rules for each asset pair to ensure data integrity.
Supported Assets (XRPL Testnet)
Core Assets
- WBTC - Wrapped Bitcoin
- WETH - Wrapped Ether
- USDC - USD Coin
- USDT - Tether USD
- DAI - Dai Stablecoin
- FRAX - Frax Stablecoin
- crvUSD - Curve USD Stablecoin
- CRV - Curve DAO Token
Liquid Staked Assets
- weETH - Wrapped eETH (ether.fi ETH)
- eETH - ether.fi ETH
- wstETH - Wrapped Staked ETH (Lido)
Reward Tokens
- RFT - RheoFi Protocol Token
Price Feed Configuration
Each oracle maintains configurable price feed sources:
| Asset | Primary Source | Fallback Source | Update Frequency |
|---|---|---|---|
| WBTC | Chainlink | Resilient | Real-time |
| WETH | Chainlink | Resilient | Real-time |
| USDC | Chainlink | Resilient | Real-time |
| USDT | Chainlink | Resilient | Real-time |
| DAI | Chainlink | Resilient | Real-time |
| FRAX | Chainlink | Resilient | Real-time |
| crvUSD | Chainlink | Resilient | Real-time |
| CRV | Chainlink | Resilient | Real-time |
| weETH | Chainlink | Resilient | Real-time |
| eETH | Chainlink | Resilient | Real-time |
| wstETH | Chainlink | Resilient | Real-time |
| RFT | Chainlink | Resilient | Real-time |
Architecture
┌─────────────────────────────────────────────┐
│ Protocol (Comptroller/RTokens) │
└────────────────┬────────────────────────────┘
│
┌────────▼────────┐
│ Resilient Oracle │
└────────┬────────┘
│
┌───────────┼───────────┐
│ │ │
┌────▼───┐ ┌────▼─────┐ ┌──▼──────┐
│Chainlink│ │ Fallback │ │ Bound │
│ Oracle │ │ Oracles │ │Validator│
└────────┘ └──────────┘ └─────────┘
Price Resolution Flow
- Request: Protocol queries price for an asset
- Primary Check: Chainlink Oracle provides price
- Validation: Bound Validator checks price bounds
- Resilience: If primary fails, Resilient Oracle falls back to alternative sources
- Response: Validated price returned to protocol
Price Feed Updates
- Real-time Feeds: Prices update immediately when new data becomes available
- Update Threshold: Prices refresh when they deviate beyond configured percentage
- Heartbeat: Prices update at minimum every 24 hours regardless of deviation
- Validation: All prices subject to bound validation before use
Notes
- All addresses are deployed on XRPL Testnet
- Oracle contracts use proxy pattern for upgradability
- Price feeds are decentralized and tamper-resistant
- Multiple fallback sources ensure high availability
- Bound validators protect against extreme price manipulation
- All prices denominated in USD with 18 decimal places