Price Oracles
Oracle prices serve as trusted external data sources that bring real-world market information into blockchain and DeFi applications. In traditional financial markets, pricing data is readily available from centralized exchanges.
Oracles solve this problem by aggregating price data from multiple sources, validating and filtering outliers, providing cryptographic proof of data integrity, and delivering consistent pricing information to smart contracts and trading systems. Accurate and reliable price feeds are fundamental to numerous DeFi operations, including lending protocols, derivatives platforms, and automated market makers.
Oracle Provider
Ethereal utilizes Pyth Lazer as its oracle provider. Pyth Lazer delivers high-quality, low-latency price feeds that power critical functions across our trading infrastructure. You can learn more about Pyth Lazer by visiting their site or reading their documentation.
Oracle Price Applications
Oracle prices from Pyth Lazer serve two primary functions within Ethereal.
Mark Price Determination
Mark prices derived from oracle feeds play a crucial role in our risk management system. An offchain price feed stream consumer subscribes to price updates emitted from Pyth Lazer, and these oracle prices are periodically pushed into our matching engine.
When a new mark price enters the system, it triggers position risk calculations across all active positions. Each update evaluates which positions are at risk for liquidation based on maintenance margin requirements, with positions falling below required margins flagged for potential liquidation.
These mark prices are tracked and subsequently used for price verification onchain, validating maintenance margin requirements during liquidation settlement. This ensures liquidations occur fairly and only when warranted by actual market conditions. For more detailed information about how mark prices factor into liquidation processes, see our Liquidations documentation.
Funding Rate Calculations
Oracle prices are essential for calculating funding rates on our perpetual exchange. Funding rates require an accurate benchmark to determine the premium or discount of perpetual contract prices. Pyth Lazer provides the spot price reference used in our basis calculations, with measurements collected throughout the hour and averaged to determine funding payments between long and short position holders.
This mechanism ensures perpetual contract prices remain anchored to the underlying spot market, maintaining market integrity and preventing price manipulation. For comprehensive details on how oracle prices factor into our funding rate mechanism, see our Funding Rates documentation.
Last updated