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
  • Description
  • Code

Was this helpful?

Export as PDF
  1. Frax Price Index

CPI Tracker Oracle

PreviousFPIS DistributionNextFPI Controller Pool

Last updated 7 months ago

Was this helpful?

Description

The oracle uses Chainlink's December 2021 CPI-U data point (provided by Fiews) as the 'base' index for determining the peg price. Each month, the change / delta percent of the index is applied to the previous month's data point to determine the peg price. December 2021 was chosen because the oracle contract requires two initial 'historical' data points.

Example:

December 2021 CPI-U: 280.126

January 2022 CPI-U: 281.933

Delta is (281.933 / 280.126) - 1 = 0.64506686%

Assuming December 2021 is $1, applying the delta percentage gives

$1 x (1.0064506686) = $1.0064506686 as the peg price.

If February 2022 CPI-U data was 284.182, the delta would be (284.182 / 281.933) - 1 = 0.79770726%.

Applying this to the previous peg price would give $1.0064506686 * (1 + 0.0079770726) = $1.0144791987 as the new peg price. In other words, you would need this many Feb 2022 dollars to buy one Dec 2021 dollar.

CPITrackerOracle (V2):

Raw data source:

Chainlink / Fiews Oracle:

Code

0x66B7DFF2Ac66dc4d6FBB3Db1CB627BBb01fF3146
https://data.bls.gov/timeseries/CUSR0000SA0
https://etherscan.io/address/0x049Bd8C3adC3fE7d3Fc2a44541d955A537c2A484
https://market.link/jobs/44964ac4-d302-4141-8f94-67e58e34b88d
frax-solidity/CPITrackerOracle.sol at master · FraxFinance/frax-solidityGitHub
Logo