Contracts

This is an overview of the contracts of the Backd protocol and their function. All contracts used by the protocol can be found on GitHub.

Core Contracts

Liquidity Pool

  • Contract holding liquidity in a single asset/coin

  • Users may deposit the underlying asset in exchange for pool-specific LP tokens

  • LP token holders can redeem their LP tokens for the underlying at any point in time

  • The LP token appreciates over the underlying as the pool accrues interest and fees over time

  • Funds are held in part by the pool and by a pool-specific vault, which handles the yield-farming logic by allocating funds to a vault-specific strategy

  • The pool’s LP token can be staked and used to pay for collateral top ups

LP Token

  • Standard ERC20 implementation for a pool’s LP token

  • LP token has same precision as the pool’s underlying coin

  • Can only get minted by pool

  • Can get burned by pool or by holder of the tokens

Vault

  • Receives deposits from a liquidity pool

  • Allocates funds to a yield-farming strategy

  • Handles profit and loss accounting of allocated strategy funds

  • Charges a performance fee on harvested profits, which is split between Backd governance token holders and the strategist

  • Allocates part of harvested profits to a vault reserve

Top Up Handler

  • Interface containing required methods for performing collateral top ups on a lending protocol

  • This needs to be implemented by each protocol-specific top up handler (e.g. Aave Handler, Compound Handler)

Top Up Action

  • LP token holders can register a position on a supported protocol for top up

  • Positions can get updated or removed at any time

  • Keepers can execute collateral top ups

  • Top-ups are executed through pre-registered top-up handlers

Top Up Action Fee Handler

  • Handles fees charged on top up amount

Staker Vault

  • Allows liquidity pool LP tokens to be staked to receive Backd governance tokens

  • Actions also stake LP tokens in a pool’s staker vault

Controller

  • Logic for adding staker vaults

  • Allows for only one staker vault per LP token

  • Can be queried for actions, staker vaults or pools

Inflation Manager

  • Contains logic for setting pool, AMM LPs and keeper inflation weights

  • Contains logic for adding gauges

Address Provider

  • Contains all addresses (e.g. pools, vaults, etc.)

Vault Reserve

  • Holds the emergency reserves for each vault

  • Vaults first need to be whitelisted

  • Funds can be withdrawn at any time by a whitelisted vault, e.g., to recover losses from the strategy

Gas Bank

  • Holds ETH on behalf of users that interact with actions.

  • ETH stored in the gas bank is solely used by users to cover their action costs.