# 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: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
