AAVE V3 Introduction

Aave V3 is a major upgrade to the popular decentralized liquidity protocol that introduces significant improvements in capital efficiency, risk management, and cross-chain functionality. Built on the foundation of Aave V2, this version enhances the protocol's capabilities while maintaining its core lending and borrowing mechanics.

Core Architecture

Aave V3 operates as a decentralized non-custodial liquidity market protocol where users can:
  • Supply assets to earn yield through aToken accumulation
  • Borrow assets against supplied collateral with variable interest rates
  • Participate in flash loans for arbitrage and other DeFi operations
The protocol uses an over-collateralization model where users must maintain a Health Factor above 1.0 to avoid liquidation. Interest rates are algorithmically determined based on supply and demand dynamics through utilization ratios.

Core Functionality Flow Analysis

1. Supply (Deposit)

Purpose: Users deposit assets to earn yield and receive aTokens
Key Steps:
  1. Reserve State Update: Accrues interest to current timestamp, updates liquidity and variable borrow indices
  1. Validation: Checks reserve status, supply caps, and prevents supplying to aToken address
  1. Asset Transfer: Transfers underlying tokens from user to aToken contract
  1. aToken Minting: Mints corresponding aTokens to user
  1. Collateral Activation: Automatically enables as collateral if eligible (non-zero LTV, not in isolation mode)
Notable V3 Features:
  • Isolation mode support for volatile assets
  • Protocol fees recorded in accruedToTreasury rather than immediate minting
  • Virtual balance accounting including unbacked token(deficit or bridged aTokens)
notion image

2. Withdraw

Purpose: Users redeem aTokens for underlying assets
Key Steps:
  1. State Update: Accrues interest and updates reserve indices
  1. Validation: Ensures sufficient balance and active reserve status
  1. aToken Burning: Burns aTokens and calculates actual underlying amount
  1. Collateral Management: Auto-disables collateral if balance reaches zero
  1. Health Factor Check: Validates position remains healthy after withdrawal
Safety Mechanisms:
  • Assets with LTV=0 must be withdrawn first
  • Health factor validation when user has active borrows
notion image

3. Borrow

Purpose: Users borrow assets against supplied collateral
Key Steps:
  1. Comprehensive Validation:
      • Reserve status and borrowing enabled
      • Sufficient liquidity and borrow caps
      • EMode compatibility
      • Siloed borrowing constraints
      • Isolation mode debt ceilings
  1. Debt Token Minting: Mints variable debt tokens to user
  1. Interest Rate Update: Recalculates rates based on new utilization
  1. Asset Release: Transfers borrowed assets to user
  1. Health Factor Validation: Ensures position remains collateralized
V3 Innovations:
  • Isolation mode: High-risk assets can only borrow specific stablecoins
  • Siloed borrowing: Certain assets restrict borrowing other assets
  • EMode: Higher efficiency for correlated assets
notion image

4. Repay

Purpose: Users repay borrowed assets to reduce debt
Key Steps:
  1. State Update: Accrues interest to current timestamp
  1. Validation: Checks non-zero amount and active reserve status
  1. Debt Token Burning: Burns corresponding variable debt tokens
  1. Interest Rate Update: Adjusts rates based on returned liquidity
  1. User Configuration: Clears borrowing flag if debt is fully repaid
Flexible Repayment Options:
  • Underlying asset repayment
  • Partial or full repayment
notion image

5. Liquidation

Purpose: Close undercollateralized positions to maintain protocol solvency
Key Steps:
  1. Health Assessment: Calculates borrower's health factor
  1. Validation: Ensures liquidation conditions are met (HF < 1.0)
  1. Bonus Calculation: Determines liquidation bonus based on EMode or reserve configuration
  1. Debt Coverage: Calculates maximum liquidatable debt based on close factor rules
  1. Collateral Seizure: Transfers collateral to liquidator with bonus
  1. Debt Burning: Burns repaid debt tokens
  1. Bad Debt Handling: Records deficits for irrecoverable positions
  1. Protocol Fees: Allocates portion of liquidation bonus to treasury
V3 Enhancements:
  • Grace period protection against immediate liquidations under certain extreme situations
  • Dust prevention mechanisms
  • Isolation mode debt tracking
  • Protocol fee distribution
notion image

6. Flash Loan

Purpose: Uncollateralized instant loans within single transaction
Key Steps:
  1. Validation: Checks reserve status and flash loan availability
  1. Fee Calculation: 0% fee for authorized borrowers, standard fee for others
  1. Asset Transfer: Transfers requested assets to receiver contract
  1. Callback Execution: Calls executeOperation on receiver contract
  1. Repayment Handling:
      • Immediate repayment with premium
      • Debt conversion option (no premium)
  1. Virtual Balance Update: Updates reserve liquidity
V3 Changes:
  • 100% of fees go to protocol treasury (vs sharing with LPs in V2)
  • Gas-optimized simple flash loans
notion image

Major Differences Compared to V2

1. Architecture & Core Mechanics

Stable Rate Removal: V3 eliminates stable rate borrowing entirely, simplifying the interest rate model and reducing protocol complexity.
Virtual Liquidity & Deficit Accounting:
  • Introduces virtualUnderlyingBalance for efficient interest calculation
  • Adds deficit tracking for protocol bad debt
  • Separates actual token balance from protocol accounting for better deficit management

2. Risk Management Innovations

Isolation Mode:
  • High-risk assets can be used as collateral with debt ceilings
  • Restricted to borrowing only specific stablecoins
  • Prevents risk contamination across asset classes
Siloed Borrowing:
  • Certain assets restrict users from borrowing other assets
  • Contains risk exposure to specific asset families
EMode (Efficiency Mode):
  • Higher LTV and liquidation thresholds for correlated assets
  • User-selectable modes for optimized capital efficiency
  • Category-specific collateral and borrowable assets

3. Enhanced Safety Features

Price Oracle Sentinel: Temporarily disables borrowing during Layer 2 sequencer downtime
Liquidation Grace Period: Protects against immediate liquidations under extreme situations
Umbrella Protocol Integration: Bad debt coverage through staked aTokens

4. Protocol Economics

Flash Loan Fees: 100% allocation to treasury (vs shared with LPs in V2)