合约总览
合约架构
( 更新于 2021/ 3 / 1 )
该图基于实时部署
Belt.fi有两个合约组(保险库和具有收益率的AMM)
合约列表
BELT Token
描述
BEP-20 BELT token 合约
Interface界面
Read
initialSupply
initialSupplyRemaining
startBlockMining
BELTPerBlock
getCirculatingSupply()
ADDRESS burnAddress
ADDRESS initialSupplyClaimer => TEAM EOA wallet
ADDRESS owner => MasterBelt contract
Write
[ONLY CLAIMER] claimInitialSupply(uint _amount)
[ONLY OWNER] mint(address _to, uint256 _amount)
MasterBelt
Description
Mint and burn BELT token
Manage VaultBPool and Distribute BELT token to VaultBPool
Calculating pendingBELT for claim
Interface
Read
ADDRESS BELT
ADDRESS burnAddress
ADDRESS owner => TEAM EOA wallet
ownerBELTReward
BELTPerBlock
startBlock
poolInfo[]
userInfo[][]
totalAllocPoint
stakedWantTokens(uint256 _pid, address _user)
pendingBELT(uint256 _pid, address _user)
Write
[ONLY OWNER] add(uint256 _allocPoint,IERC20 _want,bool _withUpdate,address _strat)
[ONLY OWNER] set(uint256 _pid,uint256 _allocPoint,bool _withUpdate)
[ONLY OWNER] inCaseTokensGetStuck(address _token, uint256 _amount)
massUpdatePools()
updatePool(uint256 _pid)
deposit(uint256 _pid, uint256 _wantAmt)
withdraw(uint256 _pid, uint256 _wantAmt)
withdrawAll(uint256 _pid)
emergencyWithdraw(uint256 _pid)
BeltStrategy
Description
Manage assets with best yield strategy
Interface
Read
ADDRESS govAddress => TEAM EOA Wallet
ADDRESS owner .=> bToken Contract
ADDRESS BELTAddress
ADDRESS wantAddress
ADDRESS vTokenAddress
wantLockedTotal()
wantLockedInHere()
Write
[ONLY OWNER][PAUSABLE] deposit(address _userAddress, uint256 _wantAmt)
[ONLY OWNER] withdraw(address _userAddress, uint256 _wantAmt)
farm(bool _withLev)
deleverageOnce()
deleverageUntilNotOverLevered()
[PAUSABLE] earn()
updateBalance()
wrapBNB()
[ONLY GOV] rebalance(uint256 _borrowRate, uint256 _borrowDepth)
[DISABLED] pause()
[DISABLED] unpause()
[DISABLED] setEntranceFeeFactor(uint256 _entranceFeeFactor)
[DISABLED] setControllerFee(uint256 _controllerFee)
[DISABLED] setbuyBackRate(uint256 _buyBackRate)
[DISABLED] setGov(address _govAddress)
[DISABLED] inCaseTokensGetStuck(address _token,uint256 _amount,address _to)
StrategyGovernance
Description
Manage Strategy contract rebalance method
Interface
Read
owner
strategyAddress
Write
transferOwnership
rebalance
bToken
Description
Mint and burn bToken
Interface
Read
pool
token
venus
provider
recommend()
approveToken()
balance()
balanceVenus()
calcPoolValueInToken()
getPricePerFullShare()
ADDRESS owner => TEAM EOA Wallet
Write
deposit(uint256 _amount)
withdraw(uint256 _shares)
rebalance()
BeltLPToken
Description
LP tokens of belt pools
Interface
Read
ADDRESS minter => StableSwapB contract
totalSupply()
Write
[ONLY MINTER] set_minter(_minter: address)
[ONLY MINTER] mint(_to: address, _value: uint256)
[ONLY MINTER] burn(_value: uint256)
[ONLY MINTER] burnFrom(_to: address, _value: uint256)
StableSwapB
Description
Swap between pool member token
Interface
Read
admin_actions_delay
coins
underlying_coins
balances
A
fee
buyback_fee
max_buyback_fee
ADDRESS owner => TEAM EOA Wallet
ADDRESS buyback_addr => TEAM EOA Wallet
token
admin_actions_deadline
transfer_ownership_deadline
kill_deadline
kill_deadline_dt
is_killed
pool_token()
get_virtual_price()
calc_token_amount(amounts: uint256[N_COINS], deposit: bool)
get_dy(i: int128, j: int128, dx: uint256)
get_dx(i: int128, j: int128, dy: uint256)
get_dy_underlying(i: int128, j: int128, dx: uint256)
get_dx_underlying(i: int128, j: int128, dy: uint256)
Write
[KILLABLE] add_liquidity(amounts: uint256[N_COINS], min_mint_amount: uint256)
[KILLABLE] exchange(i: int128, j: int128, dx: uint256, min_dy: uint256)
[KILLABLE] exchange_underlying(i: int128, j: int128, dx: uint256, min_dy: uint256)
remove_liquidity(_amount: uint256, min_amounts: uint256[N_COINS])
[KILLABLE] remove_liquidity_imbalance(amounts: uint256[N_COINS], max_burn_amount: uint256)
[ONLY OWNER] commit_new_parameters(amplification: uint256,new_fee: uint256,new_buyback_fee: uint256,new_buyback_addr: address)
[ONLY OWNER] apply_new_parameters()
[ONLY OWNER] revert_new_parameters()
[ONLY OWNER] commit_transfer_ownership(_owner: address)
[ONLY OWNER] apply_transfer_ownership()
[ONLY OWNER] revert_transfer_ownership()
[ONLY OWNER] kill_me()
[ONLY OWNER] unkill_me()
withdraw_buyback_fees()
DepositB
Description
Depositor for belt pools
Interface
Read *
Write
add_liquidity(uamounts: uint256[N_COINS], min_mint_amount: uint256)
remove_liquidity(_amount: uint256, min_uamounts: uint256[N_COINS])
remove_liquidity_imbalance(uamounts: uint256[N_COINS], max_burn_amount: uint256)
calc_withdraw_one_coin(_token_amount: uint256, i: int128)
remove_liquidity_one_coin(_token_amount: uint256, i: int128, min_uamount: uint256, donate_dust: bool = False)
[ONLY LP OWNER] withdraw_donated_dust()
VaultBPool
BeltLPToken vaults
Description
Vaults of BeltLPToken
Interface
Read
wantAddress
masterBeltAddress
govAddress
wantLockedTotal
sharesTotal
ADDRESS owner => MasterBelt Contract
ADDRESS govAddress .=> TEAM EOA Wallet
Write
[ONLY OWNER][PAUSABLE] deposit(address _userAddress, uint256 _wantAmt)
[ONLY OWNER] withdraw(address _userAddress, uint256 _wantAmt)
[ONLY GOV] pause()
[ONLY GOV] unpause()
[ONLY GOV] setGov(address _govAddress)
[ONLY GOV] setOnlyGov(bool _onlyGov)
CakeLPToken vaults
Description
Vaults of CakeLPToken
Interface
Read
-
Write
-
Belt View
Description
View status of Belt.fi contracts
Interface
Read
getSwapStat(address user)
getUserBeltStat(address user)
Write
None
Last updated