Frax Finance ¤
English 🇰🇾
English 🇰🇾
  • Frax Ecosystem Overview
  • FXS & veFXS
    • Frax Shares (FXS)
    • veFXS
    • Gauges
    • FXS Distribution
    • FXS Smart Contract & Addresses
  • GOVERNANCE
    • Frax Governance Overview
    • How It Works
    • Advanced Concepts
    • Fraxtal Snapshot Voting
  • FRAX V1 - ORIGINAL
    • Original Design
    • Staking Contracts
    • FRAX ABI & Token Addresses
    • Frax V1 Pool ABI & Addresses
    • Core Frax Multisigs
  • FRAX V2 - Algorithmic Market Operations (AMO)
    • AMO Overview
    • AMO Minter
    • Collateral Investor
    • Curve
    • Uniswap v3
    • FRAX Lending
    • Decentralization Ratio (DR)
  • FRAX V3 - 100% CR AND MORE
    • Overview
    • Fraxtal
    • AMOs
    • RWAs
    • sFRAX
    • FXBs
    • sFRAX Token Addresses
    • sFRAX & FXB Multisigs
  • Bridging
    • Fraxferry
    • LayerZero x Stargate
    • Fraxtal Bridge
  • Frax Price Index
    • Overview (CPI Peg & Mechanics)
    • Frax Price Index Share (FPIS)
    • FPIS Distribution
    • CPI Tracker Oracle
    • FPI Controller Pool
    • veFPIS
    • FPIS Conversion / FPIS Locker
    • FPI and FPIS Token Addresses
    • FPI Multisigs
  • Fraxswap
    • Overview
    • Technical Specifications
    • Fraxswap Contract Addresses
  • Fraxlend
    • Fraxlend Overview
    • Key Concepts
    • Lending
    • Borrowing
    • Advanced Concepts
      • Position Health & Liquidations
      • Interest Rates
      • Vault Account
    • ABI & Code
    • Fraxlend Multisigs
  • Frax Ether
    • Overview
    • frxETH and sfrxETH
    • Technical Specifications
    • Redemption
    • frxETH V2
    • frxETH V2 Technical Details
    • frxETH Code & V2 Addresses
    • frxETH and sfrxETH Token Addresses
    • frxETH Multisigs
  • BAMM
    • Overview
  • Frax Oracle
    • Frax Oracle Overview
    • How It Works
    • Advanced Concepts
    • Fraxtal Merkle Proof Oracles
  • Guides & FAQ
    • FAQ
    • Staking
    • Uniswap Migration / Uniswap V3
    • Fraxswap / FPI
  • Miscellany
    • All Contract Addresses
    • Bug Bounty
    • Miscellaneous & Bot Addresses
    • API
  • Other
    • Audits
    • Media Kit / Logos
Powered by GitBook
On this page
  • Motivation
  • Major Components
  • Dual Oracle / Price Source
  • Frax Oracle
  • Key Takeaways

Was this helpful?

Export as PDF
  1. Frax Oracle

Frax Oracle Overview

Oracles for Frax assets that use onchain prices and provide the same interface as Chainlink oracles

PreviousOverviewNextHow It Works

Last updated 7 months ago

Was this helpful?

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

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.

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.

Frax Oracles on L1