Docs
  • ⭐What is StableUnit ?
  • ⚙️Technical Docs
    • System Overview
    • Stability
      • Stablecoin liquidity
    • Collateral
    • Liquidations
      • Async MEV-resistant liquidation module
    • Oracles
      • LP token pricing
    • Yield distribution
    • Circuit breaker
  • 🎙️Governance
    • StableUnit DAO
      • Types of voting
      • Voting delegation
    • NFT unlock conditions
  • 🪙Tokenomics
    • Tokenomics
  • 🛡️Risks and mitigation
    • General risks & mitigation
    • Risk Framework
      • Asset-Specific Insurance Funds in StableUnit
      • Collateral Risk Management
        • Collateral Risk Management Mandate
        • Risk Management of Candidate Collaterals
        • Risk Management of Active, Listed Collaterals
        • Qualitative and Quantitative Collateral Risk Rating
        • Comparison of Collateral Risk Framework vs Peers
        • Internal & External Collateral Risk Pricing
        • Collateral Risk Mitigation
        • Collateral Risk Transfer
      • Peg Stability Risk Management
      • Technical & Smart Contract Risk Management
        • Technical & Smart Contract Risk Mitigation
      • Insurance Fund
  • Extras
    • Comparisons with others
    • FAQ
    • Links
Powered by GitBook
On this page
  • Overview
  • Class Diagram
  1. Technical Docs

Oracles

PreviousAsync MEV-resistant liquidation moduleNextLP token pricing

Last updated 11 months ago

Overview

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.

By default, the price is calculated using the TWAP from 10 seconds before the query. To increase precision, this value could be decreased but the observe function in the pool contracts will spend more gas.

Class Diagram

⚙️
price manipulation
Chainlink price feeds
t4sk