RiskOracle Output Contract
The final consumer-facing contract that stores the trusted truth and provides it to the ecosystem.
Purpose
To provide a unified, gas-efficient interface for DeFi protocols to read price and risk data.
Data Storage
- Final Aggregated Value: The deterministic, liquidity-weighted median price.
- Confidence Score: The normalized (0-100) data quality metric.
- Risk Classification: The discrete risk level (LOW, MEDIUM, HIGH, CRITICAL).
- Audit Trail: Stores listing of sources used and the final consensus timestamp.
Interfaces
- Read Interfaces: Optimized view functions for downstream consumers:
getLatestPrice(assetId)getRiskLevel(assetId)getConfidenceScore(assetId) - Historical Access: Optional access to previous rounds for settlement or backtesting via
getRoundData(roundId).
