π§ Smart Contracts
Detailed view of smart contracts.
You can find deployed contracts addresses and interfaces in Deployed Addresses.
Protocol-wide contracts
These contracts are deployed only once per chain.
ARBERAβ ERC20 token.ProtocolFeesβ Stores two fee values.yieldAdminβARBERAand rewards fee % for Future LP Yield.yieldProtocolβbrTOKENfee % for the protocol.
ProtocolFeeRouterβ Stores mutable address ofProtocolFees.IndexManagerβ Stores all Den addresses and boolean if they are verified or not.RewardsWhitelisterβ Stores list of whitelisted reward tokens.UniswapDexAdapterβ Helper contract for adding liquidity and swapping on Uniswap/forks.V3TwapUtilitiesβ Helper functions to compute Uniswap V3 X96 price, it's square root and derive V3 pool address deterministically.
Den-related smart contracts
These three contracts implementations are deployed once.
WeightedIndexβ Main Den contract (inherits fromDecentralizedIndex).StakingPoolTokenβ Allows staking Den LP tokens.TokenRewardsβ Accumulates and distributes rewards for staked Den LP tokens.
New Dens are created by calling WheightedIndexFactory .
Variables
address PAIRED_LP_TOKENβ paired Den LP token, eg.HONEY;Config configβ Configuration:address partnerβ Address of Den creator.
Fees feesβ Struct with Den fees:uint16 burnβ Burn fee (see ).uint16 bondβ Fee on wrappingTOKENintobrTOKEN.uint16 debondβ Fee on unwrappingbrTOKENintoTOKEN.uint16 buyβ Fee on buyingbrTOKENwithTOKEN.βuint16 sellβ Fee on sellingbrTOKENforTOKEN.uint16 partnerβ Den creator fee.For all the fees:
1000 = 10%, 100 = 1%, etc.
uint256 createdβ Timestamp of Den creation.address lpRewardsTokenβ Address of LP rewards token.address lpStakingPoolβ Address of Staked Den LP token.
Functions
Last updated