Oracle System
Overview
Everst uses a robust multi-oracle system to ensure accurate and manipulation-resistant price feeds for all supported assets. The protocol aggregates data from multiple trusted sources to provide reliable pricing for lending, borrowing, and liquidation calculations.
Oracle Architecture
Primary Oracle: Chainlink
Decentralized price aggregation from multiple node operators
Update frequency: Triggered when price deviates >0.5% or after set time intervals
Battle-tested across DeFi with billions in secured value
Coverage: All major tokenized stocks and stablecoins
Latency: 1-3 block confirmation time
Secondary Oracle: Pyth Network
High-frequency updates with sub-second latency
Professional-grade price feeds from institutional market makers
Confidence intervals providing price uncertainty metrics
Pull-based model allowing on-demand price updates
Specialized for financial market data
Price Aggregation Strategy
Dual-Oracle Verification
The protocol implements a sophisticated price aggregation mechanism:
Final Price = Aggregate(Chainlink Price, Pyth Price)
Normal Operation:
Both oracles must report prices within 2% deviation
Final price is the weighted average of both feeds
Chainlink weighted 60%, Pyth weighted 40%
Divergence Handling: When oracle prices diverge by more than 2%:
For collateral valuation: Use the lower price (conservative approach)
For debt calculation: Use the higher price (protective measure)
Alert triggered for manual review if divergence exceeds 5%
Fallback Mechanism
if (Chainlink fails) {
if (Pyth available && recent) {
use Pyth price with 10% additional haircut
} else {
pause affected market
}
}
Oracle Update Mechanisms
Push-Based Updates (Chainlink)
Automatic updates from decentralized node network
Triggered by price deviation or heartbeat
Gas-efficient batch updates
Pull-Based Updates (Pyth)
Keeper bots monitor off-chain prices
Update on-chain when deviation exceeds threshold
User-triggered updates for immediate execution
Security Features
Price Manipulation Protection
Multi-source verification prevents single point of failure
Time-weighted average prices (TWAP) for volatile periods
Maximum price change limits per block (circuit breakers)
Staleness checks rejecting prices older than 120 seconds
Circuit Breakers
Maximum price change per update:
- Stablecoins: ±2%
- Blue-chip stocks: ±10%
- Growth stocks: ±15%
- ETFs: ±8%
Oracle Monitoring
Real-time deviation tracking between sources
Historical price feed analysis
Automated alerts for anomalies
Manual override capabilities for emergencies
Implementation Details
Smart Contract Integration
BloPriceOracle.sol:
interface IBloPriceOracle {
function getUnderlyingPrice(BToken bToken) external view returns (uint);
function updatePrice(address asset) external;
function isPriceStale(address asset) external view returns (bool);
}
Price Feed Registry
Maintains mapping of assets to their oracle configurations:
Primary oracle address
Secondary oracle address
Deviation thresholds
Update frequencies
Fallback parameters
Gas Optimization
Batch price updates for multiple assets
Caching mechanisms for recent prices
Optimized storage patterns
Keeper Infrastructure
Automated Price Updates
Keeper bots continuously:
Monitor off-chain price sources
Calculate deviation from on-chain prices
Submit updates when thresholds exceeded
Compete for update rewards
Update Triggers
Deviation trigger: Price moves >0.5%
Time trigger: No update for >120 seconds
Liquidation trigger: Position approaching liquidation
User trigger: Manual update request
Oracle Governance
Parameter Management
Governed parameters include:
Deviation thresholds
Update frequencies
Oracle weights
Fallback conditions
Circuit breaker limits
Oracle Addition Process
Technical evaluation of feed reliability
Historical data analysis
Integration testing on testnet
Gradual mainnet rollout
Continuous monitoring period
Tokenized Stock Considerations
Market Hours Handling
Continuous 24/7 price feeds despite traditional market hours
Weekend price stability mechanisms
Holiday period adjustments
Pre/post-market price incorporation
Corporate Actions
Special handling for:
Stock splits
Dividends
Mergers and acquisitions
Ticker changes
Emergency Procedures
Oracle Failure Response
Detection: Automated monitoring identifies failure
Fallback: Switch to backup oracle if available
Pause: Affected markets paused if no reliable feed
Resolution: Manual intervention to restore service
Post-mortem: Analysis and system improvements
Manual Price Override
In extreme circumstances:
Multisig can set temporary prices
Time-limited override period
Automatic reversion to oracle feeds
Full transparency on manual interventions
Future Enhancements
Planned Improvements
Additional oracle integrations (Band, DIA)
Machine learning for anomaly detection
Cross-chain price verification
Zero-knowledge proofs for price privacy
Research Areas
Optimistic oracle mechanisms
Decentralized keeper networks
MEV-resistant price updates
Quantum-resistant cryptography
Best Practices for Users
Understanding Price Impact
Check current oracle prices before transactions
Monitor deviation between oracles
Be aware of update frequencies
Consider gas costs for price updates
Risk Mitigation
Avoid transactions during high volatility
Maintain conservative collateral ratios
Set up price alerts
Understand liquidation prices
Technical References
For developers integrating with our oracle system:
The oracle system is critical infrastructure. Report any anomalies immediately to security@everst.money
Last updated