Aave v1

Resources

Key differences

The following are key architectural differences between Aave v1 and subsequent protocol versions:

  • Tokenization: In V1, positions were not tokenized, meaning users had to manually calculate their supply & borrow balances by querying individual contracts.

  • PoolCore: V1 used a separate contract, PoolCore, to hold protocol assets, which added complexity for users and developers. In V2, this was replaced, and assets are held directly by aTokens.

  • ETH -> WETH: In V1, the protocol used ETH directly, but Aave V2 switched to WETH for consistency.

  • Interest Redirection: V1 allowed users to redirect earned interest to another address, a feature removed in V2.

  • Batch Flash Loans: V1 introduced flash loans, but they were limited to single transactions. V2 expanded this to batch flash loans and added new modes for flash loans with deferred repayment.

  • Withdraw aTokens: In V1, users had to redeem or withdraw their aTokens through the aToken contract. V2 migrated this action to the Pool contract.

Architecture

Pool Core

The PoolCore contract holds the state of every reserve and all assets supplied, as well as the basic logic (e.g. calculations using the stored data).

PoolAddressesProvider

The PoolAddressesProvider is a global addresses register of the protocol. This contract is immutable and the address will never change.

Pool Data Provider

The PoolDataProvider contract performs calculations and provides data for the Pool contract, specifically:

  • Calculates the ETH equivalent of a user's balance to assess the borrow limit of a user and the health factor of their positions.

  • Aggregates data from PoolCore to provide high level information to the Pool.

  • Calculates the Average Loan to Value and Average Liquidation Ratio.

Pool

The Pool contract uses both the PoolCore and PoolDataProvider to interact with the reserves. This is the main contract developers should interface with. See the Pool section of the documentation.

The Pool also manages the tokenization of users' supply position via aTokens.

Pool Configurator

The PoolConfigurator contract provides configuration functions for the Pool and PoolCore contracts. It also has a number of important functions:

  • Activates / Deactivates reserves,

  • Enables / Disables borrowing for a reserve,

  • Enables / Disables using a reserve as collateral,

  • Enables / Disables stable rate borrowing for a reserve,

  • Freezes / Unfreezes reserves,

  • Updates a reserve's Loan to Value,

  • Updates a reserve's liquidation threshold,

  • Updates a reserve's liquidation bonus,

  • Updates a reserve's decimals,

  • Updates a reserve's interest rate strategy address.

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.

The contract is owned by the PoolManager, as defined in the PoolAddressProvider.

Interest Rate Strategy

The InterestRateStrategy contract holds the information needed to calculate and update the interest rates of specific reserves.

Each contract stores the optimised 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. utilisation) of the asset pool.

The parameters for the optimised base curves are:

  • baseVariableBorrowRate

  • variableRateSlope1

  • variableRateSlope2

  • stableRateSlope1

  • stableRateSlope2

The interest rates are calculated depending on the available liquidity and the total borrowed amount.

Every reserve has a corresponding InterestRateStrategy contract.

Aave.com provides information and resources about the fundamentals of the decentralised non-custodial liquidity protocol called the Aave Protocol, comprised of open-source self-executing smart contracts that are deployed on various permissionless public blockchains, such as Ethereum (the "Aave Protocol" or the "Protocol"). Aave Labs does not control or operate any version of the Aave Protocol on any blockchain network.