AshSwap Docs
  • GETTING STARTED
    • â„šī¸Understand AshSwap
      • 📜AshSwap Litepaper
      • đŸĒ™AshSwap Tokenomics
      • 💸AshSwap Fees
    • đŸ—ēī¸AshSwap Roadmap
    • â›“ī¸AshSwap Token
    • â„šī¸Understand AshPerp
      • â‰ī¸Why AshPerp?
      • ⚡AshPerp Key Technologies
      • âš™ī¸How AshPerp Works
      • 💹AshPerp Oracle
      • â›‘ī¸AshPerp Fee
      • 🔤AshPerp Terms
        • âš–ī¸Borrowing Fee
        • 🌊Spread
        • 💰Net PnL
  • AshSwap DEX
    • đŸ’ŗConnect a Wallet
    • 🔄Swap
    • â†”ī¸Liquidity Provision
      • 📋Liquidity Provision Guide
    • 🌊Liquidity Staking
      • 📝Liquidity Staking Guide
    • 🧑‍🤝‍🧑Governance - AshDAO
      • 🕜Governance Staking
        • 📝Governance Staking Guide
      • âŦ†ī¸Farm Boost
        • 📝Farm Boost Guide
      • 🚮Farm Weight Voting
        • 📝Farm Weight Voting Guide
      • 🛂AshDAO Proposal
        • 📝AshDAO Proposal Guide
      • 💸Bribe
        • 📝Bribe Guide
  • Aggregator
    • 🔀Understand Aggregator
      • âŦ†ī¸Feature Updates
    • 🔁Swap Guide
    • đŸ› ī¸Aggregator Integration
      • Adding Fees
  • ASHPERP
    • 📊Trade
      • 📝Trade Guide
    • đŸ›Ąī¸Perpetual Vault
      • 📝Vault Guide
    • ⚡One-click Trading (1CT)
    • 🤝Referral
      • 📝Referral Guide
    • đŸŒĒī¸AshGuard NFTs
      • 📜AshGuard Staking Guide
      • 📜AshGuard Merge Guide
  • Developers
    • 📔Smart Contracts
      • Pool Router
      • Stable Pool
      • Crypto Pool
      • Liquidity Staking (Farming)
      • Governance Staking
    • đŸ“ĻSDKs
  • Resources
    • 🔗Links & Contact
    • âšĒDevnet
      • 🚰Faucets
    • 📝Audit Report
    • 👨‍đŸĢAshSwap Academy
      • Decentralized Finance (DeFi)? — What is it?
      • DeFi Components. What are they?
      • DeFi Handbook — Introduction to Decentralized Finance
      • 📄What is LP Token?
      • 📄Dynamic Aggregator
    • ❔Popular Error Message
Powered by GitBook
On this page

Was this helpful?

  1. GETTING STARTED
  2. Understand AshPerp

AshPerp Oracle

PreviousHow AshPerp WorksNextAshPerp Fee

Last updated 1 year ago

Was this helpful?

We currently use services provided by , 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, , 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.

â„šī¸
💹
Pyth Network
Crypto.com