GTON Capital | GC
  • GTON Capital ⚜️ Explained
  • LEARN
    • Brief Intro
    • GTON Capital in Detail
    • GameFi, SocialFi, & Real World Assets
    • GTON Network
      • Basics of Rollups
      • Protocol Overview
      • L2 Processes
      • Bridge
    • GTON Dollar (GCD)
      • Lending, CDP, and Money Markets
      • Fees
      • GCD Contracts
        • Solidity API
    • OGXT
    • Oracles
  • USE
    • GTON → OGXT Token Swap
    • OGXT/GCD Ratio
    • GTON CLI
    • Connect to GTON Testnet
    • Metamask Settings
    • Deploy to GTON Network
    • Contract Verification
    • Mint & Bridge GCD
    • Tech Support
    • Positions Liquidation and Closing the Project
  • GTON Ecosystem
    • GTON Ecosystem
  • Contributors
    • Multisig
    • Github
  • Treasury
    • Treasury Management
    • Treasury Snapshot Reports (TSR)
      • TSR 1 - 19 Jan 2022
      • TSR 2 - 19 Feb 2022
      • TSR 3 - 19 Mar 2022
      • TSR 4 - 19 Apr 2022
      • TSR 5 - 19 May 2022
      • TSR 6 - 19 Jun 2022
      • TSR 7 - 19 Jul 2022
      • TSR 8 - 19 Aug 2022
      • TSR 9 - 19 Sept 2022
      • TSR 10 - 19 Oct 2022
      • TSR 11 - 19 Nov 2022
      • TSR 12 - 19 Dec 2022
      • TSR 13 - 19 Jan 2023
      • TSR 14 - 19 Feb 2023
      • TSR 15 - 19 Mar 2023
      • TSR 16 - 19 Apr 2023
      • TSR 17 - 19 May 2023
      • TSR 18 - 19 Jun 2023
      • TSR 19 - 19 Jul 2023
      • TSR 20 - 19 Aug 2023
      • TSR 21 - 27 Feb 2024
  • Audits
    • Certik Audit
    • Securing Audit
    • Hacken Audit
  • Community
    • Snapshot (Fantom)
    • Snapshot (Ethereum)
    • ⚠️Legal Disclaimer
    • Code of Conduct
  • History & Legacy
    • Legacy Articles
      • 🪙Staking
      • 🪢Bonding
      • 🧬Pathway (PW)
        • PW FAQ
      • Roadmap
      • 👼Angels
    • Timeline Overview
    • Unlocking from staking v0/v1
    • 2021 Vision
    • GTON Token
Powered by GitBook
On this page
  • Contracts
  • Privileged roles
Export as PDF
  1. LEARN
  2. GTON Dollar (GCD)

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

PreviousFeesNextSolidity API

Last updated 2 years ago