Contracts overview

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

  • BeltMultiStrategyToken
    • 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.
Last modified 1mo ago