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
  • BTC/USD Spot oracle:
  • WBTC/BTC Spot oracle:
  • WBTC/USD Anchor Price oracle:
  • The Algorithm of WBTC/USD Max and Min Price:
  • Price Checking Mechanism:
  • Conclusion:
Export as PDF
  1. RISK MANAGEMENT
  2. Oracle

WBTC

Learn more about f(x) V2 oracle mechanism.

PreviousstETHNextAudit Reports

Last updated 2 months ago

The f(x) 2.0 price oracle mechanism for WBTC/USD combines multiple data sources, including Chainlink, Uniswap and Curve, to calculate spot prices and anchor prices. It defines Max and Min Price for WBTC/USD based on these sources and uses a governance-adjustable threshold (default 2%) 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 WBTC Spot Price Oracle Mechanism:

BTC/USD Spot oracle:

  1. []

  2. []

  3. [] * []

WBTC/BTC Spot oracle:

  1. []

WBTC/USD Anchor Price oracle:

  • [] * []

The Algorithm of WBTC/USD Max and Min Price:

  • Max: WBTC/USD Price=Max(Anchor Price, [WBTC/BTC Spot Max Price ]*[BTC/USD Spot Max Price ])

  • Min: WBTC/USD Price=Min(Anchor Price, [WBTC/BTC Spot Min Price ]*[BTC/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, 2% in default

Conclusion:

  • Min WBTC/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 WBTC/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.

🧭
Chainlink BTC/USD Spot
Uniswap V3 WBTC/USDC 0.3% Spot
Uniswap V3 WBTC/ETH 0.3% Spot
Uniswap V3 USDC/ETH 0.05% Spot
Chainlink WBTC/BTC Spot
Chainlink WBTC/BTC Spot
Chainlink BTC/USD Spot