arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

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

hashtag
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.

hashtag
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.

hashtag
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.

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

hashtag
stETH New oracle:

  1. [ ]*[]

  2. [] * [ETH/USD Spot ]

  3. [] *[ ETH/USD Spot ]

hashtag
frxETH New oracle:

  1. [] * []

  2. [] * [ETH/USD Spot ]

  3. [] * [ETH/USD Spot ]

hashtag
weETH New oracle:

  1. [] * []

  2. [] * [ETH/USD Spot ]/weETH.getRate()

  3. [] *[wstETH/stETH rate] * [ ]* [ETH/USD Spot ]

hashtag
ezETH New oracle:

  1. [] * []

  2. [] * [ETH/USD Spot ]

  3. [] * [ETH/USD Spot ]

hashtag
WBTC New oracle:

  1. [] * []

  2. [WBTC/USDC spot price of ]

  3. [ ]

hashtag
CVX oracle:

  1. []

  2. []

  3. [] * [ETH/USD Spot ]

Code:​

[] * [ETH/USD Spot ]
  • [* [ETH/USD Spot ]

  • [] * [] * [ETH/USD Spot ]
    [] * [ETH/USD Spot ]
    [] * []
    https://data.chain.link/feeds/ethereum/mainnet/eth-usdarrow-up-right
    https://info.uniswap.org/#/pools/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640arrow-up-right
    https://info.uniswap.org/#/pools/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8arrow-up-right
    stETH/ETH Curve EMAarrow-up-right
    ETH/USD Chainlink TWAParrow-up-right
    stETH/ETH Curve Spotarrow-up-right
    stETH/ETH Univ3 Spotarrow-up-right
    Curve frxETH/WETH EMAarrow-up-right
    Chainlink ETH/USD TWAParrow-up-right
    Curve frxETH/WETH Spotarrow-up-right
    Curve frxeth Spotarrow-up-right
    RedStone weETH/ETH Twaparrow-up-right
    Chainlink ETH/USD TWAParrow-up-right
    Uniswap V3 ETH/weETH 0.05%arrow-up-right
    Uniswap V3 wstETH/weETH 0.05%arrow-up-right
    Curve steth-ngarrow-up-right
    RedStone ezETH/ETH Twaparrow-up-right
    Chainlink ETH/USD TWAParrow-up-right
    Curve ezETH/ETHarrow-up-right
    Balancer V2 Stablearrow-up-right
    Chainlink WBTC/BTC Twaparrow-up-right
    Chainlink BTC/USD Twaparrow-up-right
    Curve TriCryptoUSDCarrow-up-right
    Uniswap V3 WBTC/USDC 0.3% Spotarrow-up-right
    Chainlink CVX/USD Twaparrow-up-right
    Chainlink CVX/USD Spotarrow-up-right
    Curve CVX/ETHarrow-up-right
    https://github.com/AladdinDAO/aladdin-v3-contracts/pull/198arrow-up-right
    https://v2.info.uniswap.org/pair/0xb4e16d0168e52d35cacd2c6185b44281ec28c9dcarrow-up-right
    stETH/ETH Balancer Spotarrow-up-right
    stETH/ETH Curve2 Spot] arrow-up-right
    Curve stETH/frxETH Spotarrow-up-right
    Curve steth Spotarrow-up-right
    Curve weETH/ETHarrow-up-right
    Uniswap V3 WBTC/ETH 0.3% Spotarrow-up-right
    Uniswap V3 USDC/ETH 0.05% Spotarrow-up-right