Price oracles
For Simple mode
Last updated
For Simple mode
Last updated
utilizes a robust and decentralized oracle system to provide accurate and real-time price feeds for trading pairs. This system aggregates data from multiple reputable sources to ensure price integrity and protect users from anomalies.
Primary source: Pyth Oracle’s price feed serves as the anchor
Verification: Prices are cross-verified with Chainlink’s price feed
Fallback: For trading pairs not supported by Pyth Oracle, Binance Oracle is used as a backup
If Pyth Oracle’s price deviates by more than 1% from Chainlink’s price, a circuit breaker is triggered, causing the transaction to fail.
All trading pairs on Simple mode use the oracle price of the listed assets as the index price.
On-chain request: When a trader initiates a transaction, a request for the latest price is simultaneously triggered.
Off-chain aggregation: Pyth Oracle retrieves the latest price and updates the index-weighted average price feed.
On-chain verification: Simple Mode’s smart contracts compare Pyth’s price with Chainlink’s feed to verify data accuracy.
Transaction completion: Once verification is successful, the trader’s transaction is executed.
This decentralized validation process ensures there is no single point of failure and typically completes within two blocks. Additional safeguards are in place to mitigate issues arising from market disruptions or connectivity problems.
Single source deviation: If an exchange’s last price deviates more than 5% from the median price of all sources, its weight is set to zero in calculations.
Multiple sources deviation: If multiple exchanges show deviations greater than 5%, the median price of all sources is used as the index value instead of a weighted average.
Connectivity issues:
If an exchange’s data feed is inaccessible but had trades updated in the last 10 seconds, the latest available price data is used for index calculation.
If no trade data has been updated for 10 seconds, the exchange’s weight is set to zero in the weighted average calculation.