Price Oracles
Price feeds from Pyth Oracle, Chainlink and Binance Oracle are compared to ensure the most accurate real-time aggregated prices on AstherusEX.
Using Pyth Oracle's price as the anchor, if the price from Pyth Oracle differs from Chainlink's price by more than 1%, a circuit breaker will be triggered and the the transaction will fail. For trading pairs not yet supported by Pyth Oracle, AstherusEX relies on Binance Oracle as a backup.
All trading pairs on AstherusEX use the oracle price of the listed assets as the index price.
AstherusEX Oracle Architecture
Onchain: Trader sends a transaction request and simultaneously triggers a request to obtain the latest price.
Offchain: Pyth Oracle obtains the latest price request and immediately updates the latest index-weighted average price feed.
Onchain: Astherus smart contracts compare the price with Chainlink's price feed to verify the accuracy of data.
Onchain: Trader completes the transaction once all verification is done.
The entire validation process is decentralized. There is no single point of failure and only two blocks are required to complete the entire process. Additional protective measures are in place to avoid poor market performance caused by interruptions and connectivity problems in spot markets.
Price Deviation from a Single Source:
When the Last Price of a particular exchange deviates more than 5% from the Median Price of all price sources, the price weight of that exchange will be set to zero.
Price Deviation from Multiple Sources:
If the Last Price of more than 1 exchange shows a deviation greater than 5%, the Median Price of all price sources will be used as the index value instead of the weighted average.
Exchange Connectivity Problems:
If we can't access the data feed for an exchange that had trades updated in the most recent 10 seconds, we can use price data from the latest result to calculate the Price Index.
If the trade data for an exchange has not been updated for 10 seconds, the weight of this exchange will be set to zero when calculating the weighted average.
Last updated