Belt.fi
English
English
  • Belt Finance Intro
  • Vision & Roadmap
  • Team
  • Understanding Belt
    • Understanding 3Tether
    • Understanding 4Belt
    • Understanding beltTokens (beltBTC, beltETH, beltBNB, beltHT, beltSKLAY)
    • Understanding Liquidity Pools
    • Understanding Multi-Strategy Vault Fees
  • Cross-Chain Belt
    • Klaytn on Belt
    • HECO Chain on Belt
    • Cross-Chain Swap
  • Tokenomics
    • BELT token
      • BELT Single Staking
    • Mining Distribution Rates
    • Managing BELT Supply
      • Buyback & Burn Policy
  • Security and Risks
    • Bug Bounty
  • FAQ
  • Contracts
    • Contracts overview
    • Contract operation & security
    • Contract deployed info
      • HECO Belt Contracts
      • KLAYTN Belt Contracts
    • SOOHO Audit
    • HAECHI Audit
    • HECO Audit (SOOHO)
    • Dedaub Audit
  • How-to Guides
    • Cross-chain Pool (3Tether)
    • Cross-chain Swap
    • Governance & Voting
    • How to use a Belt LP Staking Pool
    • Bridging BELT (BNB) to HBELT (HECO) through Orbit Bridge
    • Providing Liquidity on HECO Belt Finance
  • Official Links
    • Main Telegram
    • Announcement Telegram
    • Chinese Telegram
    • Medium
    • Twitter
    • Belt.Fi git
    • CoinMarketCap
    • CoinGecko
    • Orbit Bridge
    • OrbitBridge git
Powered by GitBook
On this page
  • Contract architecture
  • Contract list
  1. Contracts

Contracts overview

PreviousFAQNextContract operation & security

Last updated 2 years ago

Contract architecture

( Updated 2021/ 3 / 1 )

  • Diagram is based on live deployed

  • Belt.fi have two contract group ( Vaults and AMM with Yield )

Contract list

  • BELT Token

    • Code

    • Description

      • BEP-20 BELT token contract

  • MasterBelt

    • Code

    • Description

      • Mint BELT token

      • Manages pools and Distribute BELT token to pools according to their points allocated

      • Calculating pendingBELT for claim

  • BeltStrategies

    • Code

    • Description

      • All of the strategy codes that BELT finance is running to earn interests for the assets deposited

  • BeltSingleStrategyToken

    • Code

    • Description

      • A SingleStrategyToken that uses one of the BeltStrategies

      • A user will receive shares by depositing assets to the SingleStrategyToken contract.

        • The shares returned will be proportional to the amount the user deposited

      • A user will receive original assets by turning in shares to the SingleStrategyToken contract

        • The assets returned will be proportional to the shares returned

      • The difference between SingleStrategyToken, SingleStrategyToken2:

        the first one has some interval in moving assets to the strategy(before that the assets remains in the SingleStrategyToken contract), whereas the second one instantly moves every assets to the strategy.

  • BeltMultiStrategyToken

    • Code

    • Description

      • A MultiStrategyToken contract has multiple strategies

      • Every one of MultiStrategyToken's strategy is a SingleStrategyToken contract.

      • A user will receive shares by depositing assets to the MultiStrategyToken contract.

        • The shares returned will be proportional to the amount the user deposited

      • A user will receive original assets by turning in shares to the MultiStrategyToken contract

        • The assets returned will be proportional to the shares returned

      • Each strategy used in the MultiStrategyToken has a ratio value assigned to it and there are ideal balances for each strategy calculated based on its ratio value assigned

      • When a user deposits, the assets are moved to a strategy most off from its ideal balance but only accounts strategies whose balances are smaller than its ideal balance (a.k.a most insufficient strategy)

      • When a user withdraws(turns in shares), the assets are withdrawn from

        1. a strategy most off from its ideal balance and whose balances are greater than its ideal balance (a.k.a most sufficient strategy)

        2. if the strategy from step 1. did not suffice then a strategy that has the most balance irrelevant from its ratio (a.k.a most locked strategy)

        3. if the strategy from step 2. did not suffice, the transaction fails.

  • BeltLPTokenv2

    • Code

    • Description

      • The LP token of 4belt stable swap

  • StableSwapBv2

    • Code

    • Description

      • A stable swap between pool member tokens

      • Each member in the stable swap is a USD pegged multi strategy token

  • DepositBv2

    • Code

    • Description

      • Depositor for the 4belt stable swap

      • Takes in USD pegged assets and returns a 4belt LP token to the user

  • VaultBPool

    • BeltLPToken vaults

      • Code

      • Description

        • Vaults of BeltLPToken

  • CakeLPToken vaults

    • Code

    • Description

      • Vaults of CakeLPToken

https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/BeltToken.sol
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earn/MasterBelt.sol
https://github.com/BeltFi/belt-contract/tree/main/contracts/bsc/earnV2/strategies
https://github.com/BeltFi/belt-contract/tree/main/contracts/bsc/earnV2/strategiesV2
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earnV2/tokens/SingleStrategyTokenImpl.sol
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earnV2/tokens/SingleStrategyTokenImpl2.sol
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earnV2/tokens/MultiStrategyTokenImpl.sol
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/swapV2/BeltLPTokenv2.vy
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/swapV2/StableSwapBv2.vy
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/swapV2/DepositBv2.vy
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earn/strategies/VaultBPool.sol
https://github.com/BeltFi/belt-contract/blob/main/contracts/bsc/earn/strategies/VaultCakePool.sol