💹AshPerp Oracle

We currently use services provided by Pyth Network, a reputable and widely-used oracle source across numerous blockchains, offering reliable data. Nevertheless, to ensure continuity in case of maintenance or downtime at Pyth, we also maintain an alternative system that involves fetching prices from centralized exchanges. This dual approach ensures consistent and accurate price fetching, bolstering our system's resilience and reliability.

  • Each of the oracle nodes take the median price from 10 CEX APIs (Binance, Bitfinex, Crypto.com, Gemini, Huobi, Kraken, OKX, Crypto-compare, Gate, and MEXC) and send the result to the aggregator contract. For each median price it receives from our nodes, the aggregator contract double-checks with the corresponding Hatom Price Feed to filter for outliers.

  • If there is a difference of more than a certain threshold (10%), it rejects the node answer and waits for the next answer. Once the prices reach proper condition, the aggregator takes the median price again and sends the final result to the trading contract to execute the order.

Lookback

Lookback empowers AshPerp to retroactively examine recent price data instead of solely relying on the current price data.

  1. Guaranteed Orders: This feature ensures that all limit, stop, stop-loss, and take-profit orders are executed at the price determined by the trader. The only exception is in cases of market gaps during open/close times, where it uses the first available post-gap market price.

  2. Zero Slippage Market Orders: Market orders now utilize the exact price from the transaction's timestamp, eliminating the slippage that previously occurred due to oracle latencies relying solely on the current price.

  3. Guarding Against Volatility and Chain Disruptions: This feature guarantees that orders are executed at the correct price, even during periods of chain congestion or potential chain downtime. It protects traders from missed orders and price volatility.

Last updated