Cipherbase
BTC ETH XMR
DeFi Entry 08 of 20

Aave Protocol: How Decentralized Lending and Borrowing Works

Aave is a leading DeFi protocol that lets users lend and borrow crypto assets directly through smart contracts — no banks or intermediaries required. Built on Ethereum and live across multiple networks, it automates everything from collateral management to interest accrual. This guide breaks down how Aave works and how to use it effectively.

Animated diagram of deposits flowing into a lending pool, a borrower posting collateral and interest flowing back to lenders.
Animated diagram of deposits flowing into a lending pool, a borrower posting collateral and interest flowing back to lenders.
On this page
  1. How Aave Works: Core Mechanics
  2. Collateral, Health Factor, and Liquidations
  3. Flash Loans
  4. Yield Farming Strategies with Aave
  5. Aave Governance and the AAVE Token

Aave is one of the most widely used DeFi protocols, letting you lend and borrow crypto assets without a bank, broker, or credit check anywhere in the picture. It runs on Ethereum and several other networks, using smart contracts to handle everything from collateral deposits to interest accrual to liquidations. If you want to get serious about DeFi lending, understanding how Aave actually works is the right place to start.


How Aave Works: Core Mechanics

Aave runs on a liquidity pool model. You deposit assets into shared pools and get aTokens back — interest-bearing tokens that represent your share of the pool. Deposit 100 USDC and you receive 100 aUSDC, which starts earning interest immediately. When you're ready to withdraw, you redeem those aTokens for your original deposit plus whatever interest has accumulated.

Borrowers pull from the same pools by posting collateral worth more than what they want to borrow. This overcollateralization model is what makes trustless lending work: the protocol holds more value than it lends out, so it never needs to verify who you are or whether you'll pay it back.

Interest Rate Models

When you borrow on Aave, you pick between two rate types.

Variable rate adjusts algorithmically based on how much of a pool is being borrowed. If 80% of the USDC pool is out on loan, rates climb to attract new deposits and push some borrowers to repay. Drop utilization to 30% and rates fall.

Stable rate locks in your rate at the time you borrow, which sounds appealing but comes with an asterisk — Aave can rebalance stable rates under extreme market conditions, so they're not truly fixed.

The utilization ratio is what drives all of this. A pool with 10,000 USDC deposited and 8,000 borrowed sits at 80% utilization, where rates are meaningfully higher than they'd be at 30%.


Collateral, Health Factor, and Liquidations

Every Aave loan comes with a Health Factor — a number that tells you how safely collateralized your position is, calculated as:

Health Factor = (Collateral Value × Liquidation Threshold) / Total Borrowed Value

Stay above 1.0 and you're fine. Drop below 1.0 — because your collateral lost value, or the asset you borrowed went up in price — and your position becomes eligible for liquidation.

Liquidation Mechanics

When a position crosses that threshold, external participants called liquidators can repay part of the debt and claim your collateral at a discount. That discount, called the liquidation bonus, typically runs 5–15% depending on the asset. It's how the protocol compensates liquidators for their gas costs and the risk of executing the transaction.

This is where MEV (Miner Extractable Value) enters the picture. Liquidations on Aave are competitive. Bots monitor on-chain positions around the clock and race to liquidate undercollateralized accounts the instant they become eligible. Searchers pay elevated gas fees to get their transactions included first, and MEV-aware block builders may reorder transactions to capture those opportunities. For regular users, the practical takeaway is straightforward: unhealthy positions get liquidated fast. The protocol treats that as a feature.

Key Risk Parameters by Asset

AssetMax LTVLiquidation ThresholdLiquidation Bonus
ETH80%82.5%5%
WBTC70%75%6.25%
USDC74%76%4.5%
DAI63%77%4.5%
LINK50%65%7.5%

Values reflect Aave V3 on Ethereum mainnet and are subject to governance changes.


Flash Loans

Flash loans are probably Aave's most technically interesting feature. You can borrow any amount of any asset with zero collateral, as long as the full amount plus a 0.09% fee comes back within the same transaction block.

If repayment doesn't happen, the entire transaction reverts — as if it never occurred. The protocol takes on no risk because the atomicity is enforced at the smart contract level. Either everything executes or nothing does.

What People Actually Use Flash Loans For

Collateral swapping is one of the cleaner use cases. Say you have an ETH-collateralized loan and want to switch to WBTC collateral without closing your position. A flash loan lets you do it in a single transaction: borrow the debt asset, repay the loan, withdraw your ETH, swap it for WBTC, re-deposit, re-borrow, repay the flash loan. Done.

Arbitrage is the other big one. Flash loans let bots exploit price gaps across DEXes without the bot operator needing to hold any capital upfront.

Here's a simplified version of a flash loan receiver contract:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {IFlashLoanSimpleReceiver} from "@aave/core-v3/contracts/flashloan/interfaces/IFlashLoanSimpleReceiver.sol";
import {IPoolAddressesProvider} from "@aave/core-v3/contracts/interfaces/IPoolAddressesProvider.sol";
import {IPool} from "@aave/core-v3/contracts/interfaces/IPool.sol";

contract FlashLoanReceiver is IFlashLoanSimpleReceiver {
    IPoolAddressesProvider public immutable ADDRESSES_PROVIDER;
    IPool public immutable POOL;

    constructor(address provider) {
        ADDRESSES_PROVIDER = IPoolAddressesProvider(provider);
        POOL = IPool(IPoolAddressesProvider(provider).getPool());
    }

    function executeOperation(
        address asset,
        uint256 amount,
        uint256 premium,
        address initiator,
        bytes calldata params
    ) external override returns (bool) {
        // Your logic here: arbitrage, collateral swap, etc.

        // Approve repayment
        uint256 amountOwed = amount + premium;
        IERC20(asset).approve(address(POOL), amountOwed);
        return true;
    }
}

Yield Farming Strategies with Aave

Aave slots naturally into broader yield farming setups because aTokens are composable — you can use them as inputs in other protocols while they're still earning interest in the background.

Recursive Lending (Looping)

Recursive lending is a common strategy: deposit an asset, borrow a portion of it, deposit that borrowed amount again, and repeat. Each loop amplifies your exposure to the deposit APY, but also increases your liquidation risk and borrowing costs.

Here's a concrete example. If ETH's deposit APY is 3% and the borrow APY is 1.5%, a loop that gets you to 2.5x leverage on the deposit side generates roughly 7.5% on your original capital, minus the 1.5% borrowing cost on the levered portion. The math works, but it requires you to watch your Health Factor closely — a sharp price move can unwind the whole thing fast.

Cross-Protocol Yield

A more conservative approach treats Aave as a base layer. Deposit stablecoins to earn the deposit APY, then use your aTokens as collateral on another protocol to stack additional yield on top. Platforms like Yearn Finance and Beefy Finance automate this compounding, harvesting rewards and reinvesting them on a regular schedule.

Whatever strategy you're evaluating, run the numbers on gas costs (mainnet fees add up quickly), smart contract risk across every protocol in the stack, and the opportunity cost of having capital locked up.


Aave Governance and the AAVE Token

Aave is governed by its token holders through an on-chain DAO. AAVE holders and stakers can create and vote on Aave Improvement Proposals (AIPs), which cover everything from listing new assets and adjusting risk parameters to deploying the protocol on new networks.

“Smart contracts will replace lawyers.”

— Andreas Antonopoulos

It's a real-world example of DAO governance in practice. Proposals move through a structured lifecycle — a temperature check on the governance forum, a formal on-chain vote, then a time-locked execution. That time lock, typically 24–48 hours, gives users a window to exit positions before any governance changes take effect.

Frequently Asked Questions

What is Aave and how does it work?

Aave is a decentralized lending protocol where you can deposit crypto assets to earn interest or borrow against your holdings. It runs on smart contracts, so there's no bank or middleman involved — everything is automated on the blockchain. You simply connect a wallet like MetaMask, deposit collateral, and start earning or borrowing instantly.

What does it mean to 'supply' assets on Aave?

Supplying means depositing your crypto into Aave's liquidity pools, which other users can then borrow from. In return, you earn a variable (or sometimes stable) interest rate that adjusts based on supply and demand. Your deposited assets are represented by 'aTokens' in your wallet, which automatically accumulate interest over time.

What is a liquidation and how do I avoid it on Aave?

Liquidation happens when the value of your collateral drops too close to the value of your loan, triggering an automatic repayment to protect the protocol. Aave shows you a 'Health Factor' — keep it well above 1 to stay safe; if it hits 1, you get liquidated. To avoid this, borrow conservatively (well below your maximum), monitor your positions during volatile markets, and repay or add collateral if your Health Factor starts dropping.

Video Resources

Sources & Further Reading

  • Aave Docs — Lending protocol documentation, risk parameters and governance.
  • Compound Docs — Documentation for the Compound money market protocol.
  • DeFi Llama — Total value locked and protocol analytics across chains.
  • Ethereum.org: DeFi — Official introduction to decentralised finance on Ethereum.
  • Uniswap Docs — Protocol documentation for the leading automated market maker.
  • Finematics — Educational explainers on DeFi mechanisms with diagrams.
  • Lido Docs — Liquid staking protocol documentation.