> For the complete documentation index, see [llms.txt](https://docs.asterdexcorp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.asterdexcorp.com/trading/1001x/price-oracles.md). Agents can also search and read this documentation through its [MCP server](https://docs.asterdexcorp.com/~gitbook/mcp).

# Price Oracles

For 1001x

1001x 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.

### **Data Sources**

* **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 1001x use the oracle price of the listed assets as the index price.

### **How Prices are Fetched and Verified**

1. On-chain request: When a trader initiates a transaction, a request for the latest price is simultaneously triggered.
2. Off-chain aggregation: Pyth Oracle retrieves the latest price and updates the index-weighted average price feed.
3. On-chain verification: 1001x’s smart contracts compare Pyth’s price with Chainlink’s feed to verify data accuracy.
4. 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.

### **Protective Measures**

* 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.asterdexcorp.com/trading/1001x/price-oracles.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
