Comment on page
Accurate Oracle Execution
Avantis uses Pyth's low latency solution and Chainlink's decentralized network
Since Avantis is an oracle based trading platform, we always get the most accurate trading price for each of our listed assets. There is no price discovery that happens within the platform (given it is not an exchange), but the benefit of that is that our users get the best execution prices.
Accurate Oracles With Minimal Risk and Low Latency (Pyth)
- 1.Weighted Price Feeds: One of the biggest risks of price manipulation are when prices are volatile or there is a temporary lapse of latency. Instead of relying on a single source, high quality feeds are filtered by robustness and weighted by accuracy. With a high quality network of publishers on Pythnet (over 70+ first party data providers), unreliable sources and large deviations are filtered out to maintain the best accuracy.
- 2.On-Demand Pricing: Another common issue with Oracle pricing is the latency incurred when a specific price feed is not updated in time. At worse this results in exploits in the protocol, and at best, a bad experience for the user when transactions execute with inaccurate prices. To minimize latency, we utilize on-demand prices for every transaction made by the user. This means new prices are constantly requested on-chain before a trade is executed, and results in resilient execution prices in unfavorable conditions
- 3.Fail-Safe Smart Contracts: When the price feeds above exceed acceptable deviations (wide confidence intervals), no transaction ever takes place, preventing bad actors from draining the protocol
Chainlink Oracle For Maximum Decentralization
In order to minimize risk and maximize decentralization, we have also incorporated Chainlink feeds in our solution as the industry standard. In conjunction with Pyth's on-demand solution, the protocol receives the best of both worlds in terms of low latency as well as high security. The goal is to avoid high-risk scenarios that can occur during huge hacks or volatile times, for example inaccurate data or price feed downtime.
As a fallback where possible, Chainlink feeds will be used for each trade that takes place on the protocol. For each trade, the contracts will fetch the latest on-demand price and compare it against the Chainlink feed. If the price differs too much from the Chainlink feed, the transaction is failed and the user is invited to try again. In any case, both feeds must be up and present before a trade can be completed. The threshold for failing will change depending on market environment, liquidity and the asset, but currently it will be set to 5% for liquid pairs.
For example, assume the on-demand price for ETH is $1600, but the Chainlink feed provides a price of $1400. In this case, the difference between the two is $200 / $1400 => 14.3% which greatly exceeds the threshold of 5%. The transaction will fail.