The main contracts in BendDAO and their purposes are:
The main entry point into the Bend Protocol. Most interactions with Bend will happen via the LendPool, including:
The NFT loan manager of the protocol, generate unique loan when NFTs are used as collateral in the borrowing, and maintain relationship between NFT and loan.
The main addresses register of the protocol, for particular markets. The latest contract addresses should be retrieved from this contract by making the appropriate calls.
Contains a list of active LendPoolAddressesProvider addresses, for different markets.
The interest bearing, tokenized deposits used throughout the Bend protocol. They implement most of the standard ERC20 token methods with slight modifications, as well as Bend specific methods including:
The tokenized borrow positions used throughout the Bend protocol. Most of the standard ERC20 methods are disabled, since debt tokens are non-transferrable.
The promissory note, tokenized collaterals used throughout the Bend protocol. Most of the standard ERC721 methods are disabled, since boundNFT tokens are non-transferrable.
The following contracts should generally not be interacted with directly, but are used throughout the Bend Protocol via contract calls.
Provides configuration functions for the LendPool contracts. It also has a number of important functions:
- Activates / Deactivates reserves,
- Enables / Disables borrowing for a reserve,
- Freezes / Unfreezes reserves,
- Updates a reserve's decimals,
- Updates a reserve's interest rate strategy address,
- Activates / Deactivates NFT collections,
- Freezes / Unfreezes NFT collections,
- Enables / Disables using a NFT collection as collateral,
- Updates a NFT collection's Loan to Value,
- Updates a NFT collection's liquidation threshold,
- Updates a NFT collection's liquidation bonus,
- Activates / Deactivates all functions of a LendPool in emergencies.
For all of the above functions, relevant events are emitted to the blockchain. Anyone can monitor these changes to know when values have been modified or added/removed.
Holds the information needed to calculate and update the interest rates of specific reserves. Each contract stores the optimized base curves using the corresponding parameters of each currency. This means that there is a mathematical function which determines the interest rate of each asset pool, with the interest rate changing based on the amount of borrowed funds and the total liquidity (i.e. utilization) of the asset pool. The parameters for the optimized base curves are:
The interest rates are calculated depending on the available liquidity and the total borrowed amount.