fx Docs
  • f(x) Protocol Documentation
  • OVERVIEW
    • πŸ“–Abstract
    • ⭐Core Products of f(x) Protocol 2.0
  • f(x) Protocol Mechanisms
    • βš–οΈThe f(x) Invariant
    • βš™οΈKey Functions of f(x) 2.0
    • πŸš€Creating a Leveraged Position (xPOSITION)
    • πŸͺ‚Rebalancing the Position (Liquidation Brake)
      • Understanding the band system
      • Liquidation process
      • Developers
    • πŸ’°Stability Pool
    • πŸ’΅Fees
  • RISK MANAGEMENT
    • πŸ§˜β€β™‚οΈRisk framework
    • βœ…Advanced Peg Protection Mechanisms
      • Understanding the redemption mechanism
    • 🚨Risk parameters
    • 🧭Oracle
      • stETH
      • WBTC
    • πŸ›‘οΈAudit Reports
  • Earn with f(x)
    • πŸ’²USD high & sustainable yield
    • πŸͺ™$FXN Tokenomics
      • veFXN
      • FXN Farming and veFXN Boost
    • πŸ”₯Protocol Revenue & Distribution
  • POWER TO THE PEOPLE
    • 🀝Get involved - Community Booster Program
    • πŸ«‚Referral Program
  • FAQ
    • 🟦Is fxUSD an algorithmic stablecoin?
    • 🟦Where does the yield come from?
    • 🟦How do f(x) Protocol stablecoins maintain stability?
    • 🟦Is there any LUNA-like risk?
    • 🟦How does f(x) Protocol minimize liquidations?
    • 🟦How does f(x) Protocol minimize funding costs?
    • 🟦What could go wrong?
    • 🟦Why are there different stablecoins?
    • 🟦What is the difference between f(x) Protocol V1 and V2?
    • 🟦What price drop would it require for my xPOSITION to be rebalanced/liquidated?
  • GUIDES
    • πŸ“ˆHow to open a leverage position (xPOSITION)
    • πŸ“‰How to close a leverage position (xPOSITION)
    • πŸ“How to adjust your leverage / how to reduce your Liquidation Brake
    • βž•How to add/reduce a leverage position?
    • πŸ’°How to stake into the stability pool?
    • πŸšΆβ€β™‚οΈHow to unstake from the stability pool?
  • MORE
    • πŸ”‘Token Breakdown
    • 1️⃣f(x) Protocol 1.0
      • Leverage
      • Earn
      • Stability Mechanism
      • FX Auto-Compound
      • Oracle
    • πŸ–₯️Resources
      • Contracts
      • Useful links
    • πŸͺ”Aladdin DAO
    • 😎 Brand Assets
Powered by GitBook
On this page
  • ETH/USD Spot oracle:
  • stETH/ETH Spot oracle:
  • stETH/USD Anchor Price oracle:
  • The Algorithm of stETH/USD Max and Min Price:
  • Price Checking Mechanism:
  • Conclusion:
Export as PDF
  1. RISK MANAGEMENT
  2. Oracle

stETH

Learn more about f(x) V2 oracle mechanism.

PreviousOracleNextWBTC

Last updated 4 months ago

The f(x) 2.0 price oracle mechanism for stETH/USD combines multiple data sources, including Chainlink, Uniswap, Curve, and Balancer, to calculate spot prices and anchor prices. It defines Max and Min Price for stETH/USD based on these sources and uses a governance-adjustable threshold (default 1%) to decide whether to rely on the Anchor Price or the Max/Min Price for operations like rebalancing, minting, or redeeming. This ensures accurate and stable pricing while accommodating market fluctuations. Below is the detailed breakdown of the stETH Spot Price Oracle Mechanism:

ETH/USD Spot oracle:

stETH/ETH Spot oracle:

  1. []

  2. []

  3. []

  4. [

stETH/USD Anchor Price oracle:

  • [ ]*[]

The Algorithm of stETH/USD Max and Min Price:

  • Max: stETH/USD Price=Max(Anchor Price, [stETH/ETH Spot Max Price ]* [ETH/USD Spot Max Price ])

  • Min: stETH/USD Price=Min(Anchor Price, [stETH/ETH Spot Min Price ]* [ETH/USD Spot Min Price ])

Price Checking Mechanism:

  • Anchor Price is used, while the price difference between Anchor Price and Max/Min Price exceeds the threshold

  • The threshold is a governed parameter, 1% in default

Conclusion:

  • Min stETH/USD Price is used for Open/Close of xPOSITION risk control, Rebalance and Liquidation if the price difference between Anchor Price and Min Price doesn’t exceed the threshold. Anchor Price is used otherwise.

  • Max stETH/USD Price is used for Redeeming fxUSD if the price difference between Anchor Price and Max Price doesn’t exceed the threshold. Anchor Price is used otherwise.

🧭
https://data.chain.link/feeds/ethereum/mainnet/eth-usd
https://info.uniswap.org/#/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640
https://info.uniswap.org/#/pools/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8
https://v2.info.uniswap.org/pair/0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc
stETH/ETH Curve Spot
stETH/ETH Univ3 Spot
stETH/ETH Balancer Spot
stETH/ETH Curve2 Spot]
stETH/ETH Curve EMA
ETH/USD Chainlink Spot