Open Source Smart Contract

https://github.com/Blend-Blend/blend-contract

Core Contracts

Core protocol contracts fall in following 4 categories:

  • Configuration

  • Pool logic

  • Tokenization

  • Misc

Configuration

ACLManager

Blend Protocol implements an access control list to segregate powers and/or benefits that can be allocated to different entities on the protocol. The roles and holders are managed in the ACLManager.sol, which keeps track of the individual roles and its holders.

PoolAddressesProvider

The main addresses register of the protocol, containing address of core protocol contracts and ACL admin. It acts as factory of proxies and admin of those. The owner of this contract has the right to set/update implementation of the upgradable contracts. The latest contract addresses should be retrieved from this contract by making the appropriate calls.

PoolAddressesProviderRegistry

Contains a list of active PoolAddressProvider addresses, for different markets. It is used for indexing all Blend protocol’s markets.

PriceOracleSentinel

Oracle Sentinel validates if operations are allowed depending on the PriceOracle health. Once the PriceOracle gets up after an outage/downtime, users can make their positions healthy during a grace period.

Pool Logic

DefaultReserveInterestRateStrategy

Implements the calculation of the interest rates depending on the reserve state. This contract holds the information needed to calculate and update the yield relating to specific liquidity pools.

Each contract stores the optimised base curves using the corresponding parameters of each asset. This means that there is a mathematical function which determines the yield of each liquidity pool, with the yield changing based on the amount of borrowed funds and the total liquidity (i.e. utilisation) of the pool.

Pool

The main entry point into the Blend Protocol. Most user interactions with the Blend Protocol occur via the Pool contract. Pool is owned by the PoolAddressesProvider of the specific market. All admin functions are callable by the PoolConfigurator contract, which is defined in PoolAddressesProvider.

PoolConfigurator

Provider configuration methods for the Pool contract. The write methods of this contract can only be called by addresses with corresponding permission-ed system roles that are managed by ACLManager.

Tokenization

bToken

Yield-generating tokens that are minted and burnt upon supply and withdraw of assets to Blend Pool

DelegationAwareBToken

The special type of bToken that are minted and burnt upon supply and withdraw of assets that has voting power associated (which can be delegated) with them.

StableDebtToken

The non-transferable interest accruing, stable rate tokenised borrows.

VariableDebtToken

The non-transferable interest accruing, variable rate tokenised borrows.

Misc

BlendOracle

Contract to get asset prices, manage price sources and update the fallback oracle.

BlendProtocolDataProvider

Peripheral contract to collect and pre-process information from the Pool.

Peripheral Contracts

Rewards

RewardsController

This contract is responsible for configuring the different rewards and the claim process.

Transfer Strategies

These are isolated contracts that manages the procedure of the rewards transfer at claim. This allows the RewardsController to support any custom rewards like Staked $Blend, common ERC20 or even NFT.

Misc

UiIncentiveDataProviderV3

Helper contract to fetch Incentives Data. It is used by Blend UI for reward balance info.

UiPoolDataProviderV3

Helper contract, used by Blend UI, to fetch Pool Data such reserves list, all reserves data like liquidity, token addresses, rate strategy etc.

WalletBalanceProvider

Used for getting multiple tokens balance for one user address. This contract is used by Blend backend to reduce the number of blockchain calls for fetching user balance.

Last updated