Skip to main content

Contracts Overview

Core Contracts

  • USDi: USDi rebases positively using Ufragments developed by Ampleforth. The contract is upgradable via governance.
  • Vault: each borrower posts collateral assets in their own vault. The contract is not upgradable.
  • VaultController: contains the core math and the functionalities of the protocol. Each Vault references VaultController. The contract is upgradable via governance

Periphery Contracts

  • CurveMaster: VaultController calls this contract to calculate the borrow rate. Address is set at VaultController.
    • ThreeLines0_100: called by CurveMaster to calculate the borrow rate.
  • OracleMaster: called by VaultController to get prices. Address is set at VaultController.
    • AnchoredViewRelay: called by OracleMaster to sanity-check the main oracle against the anchor oracle.
    • ChainlinkOracleRelay: called by AnchoredViewRelay. Gets lastestAnswer from the Chainlink oracle. Serves as the main oracle.
    • UniswapV3OracleRelay: called by AnchoredViewRelay. Calculates the TWAP from a UniV3 pair. Serves as the anchor oracle.

Governance Contracts

  • GovernorDelegate: implementation governance contract.
  • GovernorDelegator: base governance contract that references the implementation for core logic.

Token Contracts

  • TokenDelegate: implementation token contract.
  • TokenDelegator: base token contract that references the implementation for core logic.