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
—ARBERA
and rewards fee % for Future LP Yield.yieldProtocol
—brTOKEN
fee % 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 wrappingTOKEN
intobrTOKEN
.uint16 debond
— Fee on unwrappingbrTOKEN
intoTOKEN
.uint16 buy
— Fee on buyingbrTOKEN
withTOKEN
.uint16 sell
— Fee on sellingbrTOKEN
forTOKEN
.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