🧠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 of ProtocolFees.

  • 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.

These three contracts implementations are deployed once.

  • WeightedIndex β€” Main Den contract (inherits from DecentralizedIndex).

  • 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 wrapping TOKEN into brTOKEN.

    • uint16 debond β€” Fee on unwrapping brTOKEN into TOKEN.

    • uint16 buy β€” Fee on buying brTOKEN with TOKEN.​

    • uint16 sell β€” Fee on selling brTOKEN for TOKEN.

    • 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