- Central Oracle: The VaultPriceFeed contract serves as the central oracle system for the protocol, providing token prices for position sizing, liquidation checks, and swap calculations.
- Multiple Oracle Sources:
- Primary Oracle: This is the preferred source for price data due to its reliability and decentralization.
- Secondary Price Feeds: These can be configured as backup or complementary price sources.
- AMM-based Pricing: Prices derived from AMM pools can be used, though they are typically less reliable.
- Prioritization: The system prioritizes the primary oracle. Secondary sources are only used when explicitly configured or when primary sources are unavailable.
- Flexible Configuration: The system allows for enabling or disabling specific oracles per token, providing optimal pricing flexibility.
- Price Validation and Adjustment: The VaultPriceFeed handles fetching token prices, validating and adjusting price data, and providing maximum and minimum prices with configurable spreads.