> For the complete documentation index, see [llms.txt](https://docs.zkdx.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zkdx.io/litepaper/oracle.md).

# Oracle

The price oracle plays a critical role in zkDX by providing accurate and secure pricing information for trading. To meet these requirements, zkDX has developed a hybrid oracle architecture that ensures real-time and accurate prices while avoiding potential attacks.

The hybrid oracle utilized by zkDX combines the strengths of Chainlink, Pyth, and other well-established price oracles, alongside a self-feeding price system. This approach enables zkDX to cover both widely traded assets and long-tail assets.

For trading products with sufficient liquidity, zkDX leverages Chainlink and Pyth to provide technical support and obtain reliable intermediate prices, ensuring the accuracy of trading.

Regarding long-tail assets with lower liquidity, zkDX relies on price nodes which is a combination of the oracle price, and the average price from several major DEXs or CEXs of the trading assets to determine the most precise matching price. This approach facilitates close monitoring of prices, and if the price deviates by more than 0.5%, the node is excluded from the average calculation. As a result, even in extreme situations, any potential loss is controlled within a limited range.

By leveraging the zkDX hybrid oracle solution, users can have utmost confidence in their trading activities and the security of their assets. This architecture guarantees real-time and accurate pricing, enabling seamless execution of limit orders and stop-loss orders, and delivering a user experience comparable to the major CEXs.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zkdx.io/litepaper/oracle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
