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
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.
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.
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.
[stETH/ETH Curve Spot] * [ETH/USD Spot ]
[stETH/ETH Univ3 Spot] *[ ETH/USD Spot ]
[stETH/ETH Balancer Spot] * [ETH/USD Spot ]
[stETH/ETH Curve2 Spot] * [ETH/USD Spot ]
[Curve frxETH/WETH Spot] * [ETH/USD Spot ]
[Curve frxeth Spot] * [ETH/USD Spot ]
[Curve stETH/frxETH Spot] * [Curve steth Spot] * [ETH/USD Spot ]
[Uniswap V3 ETH/weETH 0.05%] * [ETH/USD Spot ]/weETH.getRate()
[Uniswap V3 wstETH/weETH 0.05%] *[wstETH/stETH rate] * [ Curve steth-ng]* [ETH/USD Spot ]
[Curve weETH/ETH] * [ETH/USD Spot ]
[Curve ezETH/ETH] * [ETH/USD Spot ]
[Balancer V2 Stable] * [ETH/USD Spot ]
[WBTC/USDC spot price of Curve TriCryptoUSDC]
[Curve CVX/ETH] * [ETH/USD Spot ]
Code: https://github.com/AladdinDAO/aladdin-v3-contracts/pull/198