GCD Contracts

Contracts

  • CDPManager01.sol— a contract that contains functions that allow the users to deposit collaterals and borrow GCD tokens, or repay GCD to close their debt positions. It is responsible for calling functions in the Vault.sol contract to manage collateralized debt positions.
  • CDPRegistry.sol — a contract that dynamically stores data about collateral addresses and their owners' addresses. It contains functions used to verify, add or remove owners' addresses from the Collateralized Debt Position (CDP) data based on to user activity.
  • CollateralRegistry.sol — a contract that allows you to add or remove a collateral token address.
  • GCD.sol - a simple ERC20 token contract. Total supply is not capped, and additional minting is allowed. Vault contract address can mint new tokens or burn users’ tokens without allowance. It has the following attributes:
    • Name: GCDStablecoin
    • Symbol: GCD
    • Decimals: 18
  • OracleRegistry.sol — a contract that manages oracles, allowing to set or unset oracles and oracle types for assets.
  • Vault.sol — is the core contract that holds and manages the collateral for all debt positions. It controls the minting or burning of GCD stablecoin according to borrowing or repayment transactions.
  • VaultParameters.sol — an upgradable contract that allows for the management of the GCD system. It establishes the fundamental parameters for the project, such as allowed collaterals, oracle types, stability fees, liquidation fees, vault access, and foundations.
  • LiquidationAuction02.sol— a contract that allows to burn GCD tokens and take the calculated amount from collateral tokens from liquidated positions. The redeem function can be called by anyone, but it is reserved for the system manager.
  • ChainlinkedOracleMainAsset.sol— the oracle contract that gets USD prices for given tokens.
  • VaultManagerParameters.sol — management contract that allows the manager to set borrowing and liquidation fees.
  • ReentrancyGuard.sol — a contract module that helps prevent reentrant calls to a function.
  • TransferHelper.sol — a simple contract that contains safe transfer and safe approve functions for the given ERC20 token addresses and values.
  • ForceTransferAssetStore.sol — a contract that maps assets to a boolean status of forcing a single token transfer.
  • UniswapV3Oracle.sol — a contract to get USD value of GCD tokens. During this conversion, the default pool fee is 3%, which is stable.
  • TickMath.sol— a math library for computing sqrt prices for ticks of size 1.0001.
  • FullMath.sol — enables division and multiplication with no loss of precision when an intermediate value is overflown.
  • OracleLibrary.sol — a library contract that provides functions to integrate with V3 pool oracle.
  • PoolAddress.sol — a contract that provides functionality for deriving a pool address from the factory, tokens, and fee.
  • LowGasSafeMath.sol — a library contract that provides optimized overflow and underflow safe math operations.

Privileged roles

  • The manager role can:
    • add/remove an asset address to be used as collateral
    • set stability and liquidation fees, oracle type and token debt limit
    • mark asset as `shouldForceTransfer`
    • set/unset oracle addresses and their oracle types
    • set quote params in UniswapV3Oracle
    • set default TWAP period
    • set default quote aasset
  • The vault role can:
    • mint/burn GCD tokens
    • create new debt positions, deposit collaterals, borrow GCD tokens, withdraw collaterals, repay debt and update users’ debt
Last modified 29d ago
Export as PDF
Copy link
On this page
Contracts
Privileged roles