November 14, 2020

Aave Protocol Explained

Zainab Hasan


The Decentralized Finance (DeFi) ecosystem is the most promising application of Blockchain.  Aave protocol existed in 2017 as ETHlend, which was a peer to peer lending and borrowing strategy, i.e. a direct relation between lenders and borrowers. Then, a parent company of ETHLend was introduced. This parent company uses the pool-based strategy.

The word “aave” is Finnish, which means “ghost”. In fact, it represents Aave’s intention of creating a transparent and open DeFi infrastructure. 

Aave DeFi Protocol

Aave falls in the lending category of DeFi. Hence, it is the protocol that enables the user to earn interest on their deposits and/or to borrow assets. 

Lenders deposit cryptocurrencies into a pool contract to provide liquidity. Simultaneously, in the same contract, users can place collateral and borrow pool funds. Loan amounts rely on the pool’s funds, the amount borrowed, and their collateral.


Every Aave pool holds as much as 20 cryptocurrencies. The total liquidity is equivalent to the total amount of these cryptocurrencies but in terms of Ethers. The depositors lend their assets to the protocol. Then the protocol mints ERC-20 compliant aTokens in a 1:1 ratio for those assets. So, anyone depositing assets in the Aave protocol receives Aave-interest-bearing tokens(aTokens). If a user deposits 100 DAI, he will receive 100 aTokens. The aTokens allow the depositors to earn interest, which is accrued by the second and can be viewed in real-time.

The borrowers can borrow these assets by locking collateral greater than the requested amount.

Furthermore, every pool sets aside reserves to shield against volatility, in simpler words, the protocol separates the reserve assets from total assets, these reserves ensure that lenders can withdraw their assets anytime they are ready to exit the protocol.

Lending Pool Basics


According to the smart contract, the deposit action is the simplest one. When the user deposits assets

  1. Update Borrow and/or liquidity indexes.
  2. Total Liquidity increases.
  3. Update Interest rates.
  4. Supplied asset’s equivalent aTokens are minted.
  5. Finally, Underlying assets are transferred to reserves.


The redeem action enables the users to exchange aTokens with underlying assets. It follows the following sequence of actions.

  1. Check the user’s aToken balance.
  2. If the balance is not enough, revert the transaction, else calculate the amount underlying to redeem.
  3. If the reserve available liquidity is enough, update the borrow or liquidity index. Otherwise, revert the transaction.
  4. Burn the requested tokens.
  5. For each loan, the risk factors enable the calculation of health factors. If this health factor is below 1, revert the transaction. Otherwise, decrease total liquidity.
  6. Then, Update the interest rates.
  7. End the transaction by transferring underlying assets to the user.


Users lock the collateral amount in exchange for underlying assets. The flow of action is as below:

  1. If there is enough liquidity the borrow mode is valid, then the contact checks whether the user collateral balance is enough and the health factor is greater than one. If any condition fails the transaction reverts. Otherwise, the borrow assets amount and liquidity indexes.
  2. Adds the accrued interest to the current borrower balance.
  3. Adds the new borrow amount to the current borrow balance.
  4. Updates reserve total borrows by rate.
  5. Sets user interest rate mode.
  6. Increase the total reserve liquidity by accrued interest (if any).
  7. Update the interest rate.
  8. Calculates and sets the user liquidation rate.
  9. Lastly, transfer the underlying assets to the user.

What Gives Aave The Edge?

Although all DeFi projects share similar characteristics. Aave distinguishes itself because of the following features:

Flash Loans:

As long as users allow more liquidity than taken, flash loans allow users to borrow from reserves for a single transaction. Flash loan transfers the funds, temporarily, to a smart contract which implements the “IFlashLoanReceiver.sol”.

The flash loans follow the following flow:

  1. Firstly, the contract checks whether the reserves have enough liquidity or not.
  2. If there is enough liquidity, it transfers funds to the action contract temporarily. Otherwise, the transaction reverts.
  3. After the action, the contract performs the specified tasks. The contract then checks if the borrowed amount plus interest is returned. If not the transaction reverts.
  4. If the correct amount is returned update borrow and liquidity indexes.
  5. Then, concludes the transaction by accruing the fee to reserves.

Flash Loan Fee:

The interest amount the user pays on the flash loan is the flash loan fee. The figure shows the manner of utilizing the flash loan fee.


Interest Rate:

Lending protocols usually restrict users to either use variable rate or stable rate. Once chosen it can't be changed. Aave however, allows its user to switch between the two choices to ensure that they get the best interest rate. This gives Aave an upper hand on other lending protocols.

Unique Collaterals:

Aave offers a wide range of DeFi collateral types to choose from. As of writing this article, the 20 cryptocurrencies available are DAI, USDC, TUSD, USDT, sUSD, BUSD, ETH, LEND, YFI, BAT, REN, ENJ, KNC, LINK, MANA, MKR, REP, SNX, WBTC and ZRX


Aave LEND:

The native token of Aave is LEND, with a total supply of 1,300,000,000. LEND was originally the utility token for ETHLend, the former version of Aave. LEND tokens are used for fee reductions. The 80% of the platform fee collected from the Aave platform is used to burn LEND tokens. In case of malicious attract which can affect the liquidity, LEND owners can offer their tokens to protect Aave, in return, they will earn protocol fees.

Afterward, Aave intends to use LEND tokens for governance. LEND holders can vote for Aave Improvement Proposals, currently in the test network, to save large payment of gas.


Aave app offers two markets, The Aave market, and the Uniswap market. Users can switch between markets to get better lending and borrowing rates. Adding the Uniswap market enabled the liquidity providers to leverage their LP tokens as collateral to borrow funds.


To offer high liquidity Aave protocol relies on a lending pool model. Collateral backs the loan and aTokens represent it. With the Aave watch, you can keep track of Aave. As of 13th November 2020, 2.6 Million worth of Ethers, equivalent to $1.19 Billion USD, are locked in Aave. Aave ranks 5th on the DeFi Pulse Board.

Also read Hyperledger Fabric Architecture: A Deep Dive

Xord is a Blockchain development company providing Blockchain solutions to your business processes. Connect with us for your projects and free Blockchain consultation at


Have a Project?
Let’s Talk About It