Oracles
Oracles that allow access to price feeds are essential for Otto protocol. Given that the protocol enables exchanges between collateral and stable assets at the oracle value, it is subject to front-running risk due to the latency of the oracle on the chain. To eliminate this risk, the protocol relies on Uniswap V3 Time-Weighted Average Price (TWAP) oracles with a 5-minute time window and Chainlink price feeds. For a feed like ETH-USD, the protocol will compare the value obtained with Chainlink with the one from Uniswap V3 (using USDC pools for USD). Indeed, if the two oracles give two different values for the USD price of ETH (1000 USD and 1100 USD), for a mint transaction, the protocol will use the lower value of the oracle to calculate the amount of stablecoins to issue based on the collateral. For a burn transaction, the protocol will use the highest value to convert an amount of stablecoins into an amount of ETH.
Last updated