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
  • Risk management
  • Net Asset Value
  • Additional protection measures for xTokens
  • [ETH/USD Spot] has 4 price sources, which are:
  • stETH New oracle:
  • frxETH New oracle:
  • weETH New oracle:
  • ezETH New oracle:
  • WBTC New oracle:
  • CVX oracle:
Export as PDF
  1. MORE
  2. f(x) Protocol 1.0

Oracle

Learn more about V1 oracle design.

Here is a breakdown of the key features and mechanisms of the oracle solution.

Enhanced collateral price feeds: In addition to the original TWAP, spot prices are incorporated, with additional price feeds from Curve, Uniswap V3, and Balancer.

Arbitrage prevention: Minting and redeeming transactions are conducted at different prices to eliminate arbitrage trades. This helps to protect the collateral held by the protocol.

  • fToken can be minted at the minimum price

  • fToken can be redeemed at the maximum price

  • xToken can be minted at the maximum price

  • xToken can be redeemed at the minimum price

Risk management

The collateralization ratio is calculated at the maximum price as well as stability pool liquidations. This ensures that risk is managed effectively and liquidations occur at appropriate levels to maintain system stability.

Net Asset Value

The NAV is calculated based on TWAP during the non-transacting periods. This NAV calculation can serve as an oracle price feed for various DeFi applications integrating f(x) assets.

Additional protection measures for xTokens

To prevent arbitrage trades, xTokens cannot be both minted and redeemed within the same block. Additionally, a transfer of xTokens cannot occur within a specified timeframe of thirty minutes after minting. These measures help in mitigating potential exploits and maintaining price integrity.

[ETH/USD Spot] has 4 price sources, which are:

  1. https://data.chain.link/feeds/ethereum/mainnet/eth-usd

  2. https://info.uniswap.org/#/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640

  3. https://info.uniswap.org/#/pools/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8

  4. https://v2.info.uniswap.org/pair/0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc

stETH New oracle:

  1. [stETH/ETH Curve EMA ]*[ETH/USD Chainlink TWAP]

  2. [stETH/ETH Curve Spot] * [ETH/USD Spot ]

  3. [stETH/ETH Univ3 Spot] *[ ETH/USD Spot ]

  4. [stETH/ETH Balancer Spot] * [ETH/USD Spot ]

  5. [stETH/ETH Curve2 Spot] * [ETH/USD Spot ]

frxETH New oracle:

  1. [Curve frxETH/WETH EMA] * [Chainlink ETH/USD TWAP]

  2. [Curve frxETH/WETH Spot] * [ETH/USD Spot ]

  3. [Curve frxeth Spot] * [ETH/USD Spot ]

  4. [Curve stETH/frxETH Spot] * [Curve steth Spot] * [ETH/USD Spot ]

weETH New oracle:

  1. [RedStone weETH/ETH Twap] * [Chainlink ETH/USD TWAP]

  2. [Uniswap V3 ETH/weETH 0.05%] * [ETH/USD Spot ]/weETH.getRate()

  3. [Uniswap V3 wstETH/weETH 0.05%] *[wstETH/stETH rate] * [ Curve steth-ng]* [ETH/USD Spot ]

  4. [Curve weETH/ETH] * [ETH/USD Spot ]

ezETH New oracle:

  1. [RedStone ezETH/ETH Twap] * [Chainlink ETH/USD TWAP]

  2. [Curve ezETH/ETH] * [ETH/USD Spot ]

  3. [Balancer V2 Stable] * [ETH/USD Spot ]

WBTC New oracle:

  1. [Chainlink WBTC/BTC Twap] * [Chainlink BTC/USD Twap]

  2. [WBTC/USDC spot price of Curve TriCryptoUSDC]

  3. [Uniswap V3 WBTC/USDC 0.3% Spot ]

  4. [Uniswap V3 WBTC/ETH 0.3% Spot] * [Uniswap V3 USDC/ETH 0.05% Spot]

CVX oracle:

  1. [Chainlink CVX/USD Twap]

  2. [Chainlink CVX/USD Spot]

  3. [Curve CVX/ETH] * [ETH/USD Spot ]

Code: https://github.com/AladdinDAO/aladdin-v3-contracts/pull/198​

PreviousFX Auto-CompoundNextResources

Last updated 5 months ago

1️⃣