Oracles
Last updated
Last updated
Oracle wise, StableUnit follows the best practices in the industry and uses a main oracle as well as a fallback one. Different oracles can be used for different assets, united by the oracle aggregator.
By default, the protocol uses Chainlink as base oracles and Uniswap TWAP oracles as a fallback. Additionally, there are price floors and ceilings for assets to indicate and mitigate any potential .
StableUnit uses three contracts to handle oracles. The SuOracleAggregator contract serves as an interface that redirects queries to the specific oracle needed for a given asset.
The SuChainlinkOracle relies on to obtain asset prices. The SuUniV3Oracle is based on the Uniswap V3 time-weighted average price (TWAP) oracle implementation by .
The DAO controls oracle parameters, and other oracle providers can be added to the oracle aggregator without redeploying the whole system.