# Frax Oracle Overview

<figure><img src="/files/AbcSPoM5Do4NjzQiAeZ3" alt=""><figcaption><p>Frax Oracles on L1</p></figcaption></figure>

## Motivation

To increase the velocity of adoption of our assets in lending protocols, AMMs, and vault products. We believe that oracles using onchain prices sources are the most reliable and verifiable.

## Major Components

### Dual Oracle / Price Source&#x20;

The Dual Oracle / Price Source contract gets two prices (high and low) from two different onchain sources and returns them both. This contract then writes the prices to the Frax Oracle contract. These contracts are largely inspired by Fraxlend Dual Oracles.

Anyone can call the addRoundData() function on the Dual Oracle to add a fresh price to a Frax Oracle. They just need to pay gas. The Frax Protocol calls this function once per day per supported asset.

### Frax Oracle

Only the Dual Oracle contract for the proper asset can write prices to a corresponding Frax Oracle. The Frax Oracle stores prices that can be retrieved in the Chainlink style with AggregatorV3Interface or in the Fraxlend getPrices() style.\
\
When interacting with a Frax Oracle through the Chainlink style, the price data will be the average of the low price and high price. When using the Fraxlend getPrices() style, the low and high price will both be given.\
\
Prices will be considered bad / stale if an underlying Chainlink oracle signals a price is bad, or if a price is too old.&#x20;

## Key Takeaways

Frax Oracle prices can be consumed identically to Chainlink oracles.

All onchain price sources have deep Frax protocol owned liquidity that we will not remove, which provides a high degree of safety.


---

# 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.frax.finance/frax-oracle/frax-oracle-overview.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.
