# Oracles

## Accurate Oracle Execution

Since Bloom is an oracle based leverage DEX, we always get the most accurate trading price for each of our listed assets. There is no price discovery that happens within the platform (given it is not an exchange), but the benefit of that is that our users get the best execution prices.

**Accurate Oracles With Minimal Risk and Low Latency (Pyth)**

<figure><img src="https://586275454-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F76vAZHPcNKY10NzuKsC4%2Fuploads%2FIj3N9RnWAImonDp4fOkL%2FPyth%20Logotype_Dark.png?alt=media&#x26;token=997af16a-6657-46ee-92cf-a40fe5d0db3c" alt="" width="375"><figcaption></figcaption></figure>

1. Weighted Price Feeds: One of the biggest risks of price manipulation are when prices are volatile or there is a temporary lapse of latency. Instead of relying on a single source, high quality feeds are filtered by robustness and weighted by accuracy. With a high quality network of publishers on [Pythnet](https://pyth.network/) (over 70+ first party data providers), unreliable sources and large deviations are filtered out to maintain the best accuracy.
2. On-Demand Pricing: Another common issue with Oracle pricing is the latency incurred when a specific price feed is not updated in time. At worse this results in exploits in the protocol, and at best, a bad experience for the user when transactions execute with inaccurate prices. To minimize latency, we utilize on-demand prices for every transaction made by the user. This means new prices are constantly requested on-chain before a trade is executed, and results in resilient execution prices in unfavorable conditions
3. Fail-Safe Smart Contracts: When the price feeds above exceed acceptable deviations (wide confidence intervals), no transaction ever takes place, preventing bad actors from draining the protocol

**Binance API Check**

Binance is the world's largest exchange with the deepest liquidity for crypto pairs. We compare the Pyth price feed with Binance's price feed API for an off-chain check. If the price match is in an acceptable range (currently set to 25bps), only then we use the price as valid and execute the order. Else - the order will revert.


---

# 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.bloom.trading/bloom/trading/oracles.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.
