{
  "axon_version": "1.0.0",
  "protocol": {
    "name": "Aave",
    "slug": "aave-v3-base",
    "version": "v3",
    "description": "Decentralized non-custodial liquidity protocol on Base (Coinbase L2). Offers lower gas costs than Ethereum mainnet while maintaining the same Aave V3 feature set.",
    "category": "lending",
    "chain": {
      "id": 8453,
      "name": "base",
      "network": "mainnet"
    },
    "contracts": {
      "pool": {
        "address": "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5",
        "label": "Pool (LendingPool V3)",
        "verified": true
      },
      "pool_addresses_provider": {
        "address": "0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D",
        "label": "PoolAddressesProvider",
        "verified": true
      },
      "oracle": {
        "address": "0x2Cc0Fc26eD4563A5ce5e8bdcfe1A2878676Ae156",
        "label": "AaveOracle",
        "verified": true
      },
      "pool_data_provider": {
        "address": "0x2d8A3C5677189723C4cB8873CfC9C8976FDF38Ac",
        "label": "PoolDataProvider (AaveProtocolDataProvider)",
        "verified": true
      },
      "a_token_impl": {
        "address": "0x98F409Fc4A42F34AE3c326c7f48ED01ae8cAeC69",
        "label": "AToken Implementation",
        "verified": true
      },
      "variable_debt_token_impl": {
        "address": "0x2425A746911128c2eAA7bEBDc9Bc452eE52208a1",
        "label": "VariableDebtToken Implementation",
        "verified": true
      }
    },
    "links": {
      "website": "https://aave.com",
      "docs": "https://docs.aave.com/developers",
      "github": "https://github.com/aave/aave-v3-core",
      "governance": "https://governance.aave.com"
    }
  },
  "actions": [
    {
      "id": "supply",
      "name": "Supply Asset",
      "description": "Supply (deposit) an ERC20 asset to the Aave V3 lending pool on Base to earn interest. The depositor receives aTokens 1:1 which accrue interest in real-time via a rebasing mechanism.",
      "type": "supply",
      "parameters": [
        {
          "name": "asset",
          "type": "address",
          "required": true,
          "description": "Address of the ERC20 token to supply"
        },
        {
          "name": "amount",
          "type": "uint256",
          "required": true,
          "description": "Amount to supply in the asset's smallest unit (wei). Use type(uint256).max to supply full wallet balance.",
          "constraints": {
            "min": "1"
          }
        },
        {
          "name": "onBehalfOf",
          "type": "address",
          "required": true,
          "description": "Address that will receive the aTokens. Use msg.sender for self."
        },
        {
          "name": "referralCode",
          "type": "uint16",
          "required": false,
          "description": "Referral code for integrator tracking. Use 0 for no referral.",
          "default": "0"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "supported_tokens": "aave_base_listed_assets",
        "requires_position": false
      },
      "approvals": [
        {
          "type": "erc20_approve",
          "token": "asset",
          "spender": "pool",
          "amount": "exact_or_max"
        }
      ],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_reserve",
          "description": "Verify the asset is listed, active, and not paused on Aave Base",
          "contract": "pool_data_provider",
          "method": "getReserveConfigurationData(address)",
          "conditional": "always",
          "returns": ["ltv", "liquidationThreshold", "liquidationBonus", "reserveFactor", "usageAsCollateralEnabled", "borrowingEnabled", "isActive", "isFrozen"]
        },
        {
          "step": 2,
          "action": "check_supply_cap",
          "description": "Verify supply amount does not exceed the reserve's supply cap",
          "contract": "pool_data_provider",
          "method": "getReserveCaps(address)",
          "conditional": "always",
          "returns": ["borrowCap", "supplyCap"]
        },
        {
          "step": 3,
          "action": "check_allowance",
          "description": "Check if the Pool contract has sufficient allowance to transfer the supply token",
          "contract": "asset",
          "method": "allowance(address,address)",
          "conditional": "always",
          "returns": ["allowance"]
        },
        {
          "step": 4,
          "action": "approve",
          "description": "Approve the Pool contract to spend the supply token",
          "contract": "asset",
          "method": "approve(address,uint256)",
          "conditional": "if_allowance_insufficient"
        },
        {
          "step": 5,
          "action": "execute",
          "description": "Supply the asset to the lending pool on Base",
          "contract": "pool",
          "method": "supply(address,uint256,address,uint16)",
          "returns": ["aTokensMinted"]
        }
      ],
      "risk_warnings": [
        "Supplied assets can be borrowed by others — smart contract risk",
        "Interest rates are variable and can change based on utilization",
        "Base is an L2 — bridge risk and sequencer uptime risk apply"
      ]
    },
    {
      "id": "withdraw",
      "name": "Withdraw Asset",
      "description": "Withdraw a previously supplied asset from the Aave V3 lending pool on Base. Burns aTokens and returns the underlying asset.",
      "type": "withdraw",
      "parameters": [
        {
          "name": "asset",
          "type": "address",
          "required": true,
          "description": "Address of the underlying ERC20 token to withdraw"
        },
        {
          "name": "amount",
          "type": "uint256",
          "required": true,
          "description": "Amount to withdraw in the asset's smallest unit. Use type(uint256).max to withdraw full balance.",
          "constraints": {
            "min": "1"
          }
        },
        {
          "name": "to",
          "type": "address",
          "required": true,
          "description": "Address that will receive the withdrawn tokens. Use msg.sender for self."
        }
      ],
      "constraints": {
        "min_amount": "1",
        "supported_tokens": "aave_base_listed_assets",
        "requires_position": true
      },
      "approvals": [],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_balance",
          "description": "Check the user's aToken balance on Base for the asset",
          "contract": "pool_data_provider",
          "method": "getUserReserveData(address,address)",
          "conditional": "always",
          "returns": ["currentATokenBalance", "currentStableDebt", "currentVariableDebt", "principalStableDebt", "scaledVariableDebt", "stableBorrowRate", "liquidityRate"]
        },
        {
          "step": 2,
          "action": "check_health_factor",
          "description": "If the asset is used as collateral, verify withdrawal keeps health factor above 1.0",
          "contract": "pool",
          "method": "getUserAccountData(address)",
          "conditional": "if_used_as_collateral",
          "returns": ["totalCollateralBase", "totalDebtBase", "availableBorrowsBase", "currentLiquidationThreshold", "ltv", "healthFactor"]
        },
        {
          "step": 3,
          "action": "execute",
          "description": "Withdraw the asset from the lending pool on Base",
          "contract": "pool",
          "method": "withdraw(address,uint256,address)",
          "returns": ["amountWithdrawn"]
        }
      ],
      "risk_warnings": [
        "Withdrawing collateral reduces health factor — may trigger liquidation",
        "Withdrawal may fail if pool liquidity is insufficient",
        "Base sequencer downtime can delay withdrawal execution"
      ]
    },
    {
      "id": "borrow",
      "name": "Borrow Asset",
      "description": "Borrow an ERC20 asset from the Aave V3 lending pool on Base against supplied collateral. Gas costs are significantly lower than Ethereum mainnet.",
      "type": "borrow",
      "parameters": [
        {
          "name": "asset",
          "type": "address",
          "required": true,
          "description": "Address of the ERC20 token to borrow"
        },
        {
          "name": "amount",
          "type": "uint256",
          "required": true,
          "description": "Amount to borrow in the asset's smallest unit",
          "constraints": {
            "min": "1"
          }
        },
        {
          "name": "interestRateMode",
          "type": "uint256",
          "required": true,
          "description": "Interest rate mode: 2 for Variable. Stable rate (1) may not be available on Base.",
          "constraints": {
            "enum": [1, 2]
          }
        },
        {
          "name": "referralCode",
          "type": "uint16",
          "required": false,
          "description": "Referral code. Use 0 for no referral.",
          "default": "0"
        },
        {
          "name": "onBehalfOf",
          "type": "address",
          "required": true,
          "description": "Address that will receive the borrowed tokens and accrue debt"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "supported_tokens": "aave_base_listed_borrowable_assets",
        "requires_position": true
      },
      "approvals": [],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_health_factor",
          "description": "Verify borrowing power supports the requested amount",
          "contract": "pool",
          "method": "getUserAccountData(address)",
          "conditional": "always",
          "returns": ["totalCollateralBase", "totalDebtBase", "availableBorrowsBase", "currentLiquidationThreshold", "ltv", "healthFactor"]
        },
        {
          "step": 2,
          "action": "check_borrow_cap",
          "description": "Ensure borrow amount doesn't exceed reserve's borrow cap",
          "contract": "pool_data_provider",
          "method": "getReserveCaps(address)",
          "conditional": "always",
          "returns": ["borrowCap", "supplyCap"]
        },
        {
          "step": 3,
          "action": "check_reserve_borrowable",
          "description": "Verify the asset is enabled for borrowing on Base",
          "contract": "pool_data_provider",
          "method": "getReserveConfigurationData(address)",
          "conditional": "always",
          "returns": ["borrowingEnabled", "stableBorrowRateEnabled", "isActive", "isFrozen"]
        },
        {
          "step": 4,
          "action": "execute",
          "description": "Execute the borrow on Base",
          "contract": "pool",
          "method": "borrow(address,uint256,uint256,uint16,address)",
          "returns": ["debtTokensMinted"]
        }
      ],
      "risk_warnings": [
        "Borrowing reduces health factor — liquidation occurs below 1.0",
        "Variable interest rates fluctuate with pool utilization",
        "Base L2 sequencer downtime may prevent timely debt management",
        "Oracle prices on Base may lag behind Ethereum mainnet briefly"
      ]
    },
    {
      "id": "repay",
      "name": "Repay Borrowed Asset",
      "description": "Repay a borrowed asset to the Aave V3 lending pool on Base. Burns debt tokens and improves health factor.",
      "type": "repay",
      "parameters": [
        {
          "name": "asset",
          "type": "address",
          "required": true,
          "description": "Address of the borrowed ERC20 token to repay"
        },
        {
          "name": "amount",
          "type": "uint256",
          "required": true,
          "description": "Amount to repay. Use type(uint256).max to repay entire debt.",
          "constraints": {
            "min": "1"
          }
        },
        {
          "name": "interestRateMode",
          "type": "uint256",
          "required": true,
          "description": "Interest rate mode of debt to repay: 1 for Stable, 2 for Variable",
          "constraints": {
            "enum": [1, 2]
          }
        },
        {
          "name": "onBehalfOf",
          "type": "address",
          "required": true,
          "description": "Address of the user whose debt is being repaid"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "supported_tokens": "aave_base_listed_borrowable_assets",
        "requires_position": true
      },
      "approvals": [
        {
          "type": "erc20_approve",
          "token": "asset",
          "spender": "pool",
          "amount": "exact_or_max"
        }
      ],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_debt",
          "description": "Check current debt balance for the asset on Base",
          "contract": "pool_data_provider",
          "method": "getUserReserveData(address,address)",
          "conditional": "always",
          "returns": ["currentATokenBalance", "currentStableDebt", "currentVariableDebt"]
        },
        {
          "step": 2,
          "action": "check_allowance",
          "description": "Check Pool allowance for repayment token",
          "contract": "asset",
          "method": "allowance(address,address)",
          "conditional": "always",
          "returns": ["allowance"]
        },
        {
          "step": 3,
          "action": "approve",
          "description": "Approve the Pool to spend the repayment token",
          "contract": "asset",
          "method": "approve(address,uint256)",
          "conditional": "if_allowance_insufficient"
        },
        {
          "step": 4,
          "action": "execute",
          "description": "Repay the borrowed asset on Base",
          "contract": "pool",
          "method": "repay(address,uint256,uint256,address)",
          "returns": ["amountRepaid"]
        }
      ],
      "risk_warnings": [
        "When repaying max, ensure sufficient balance to cover accrued interest",
        "Interest accrues between approval and repay — approve slightly more",
        "Base sequencer downtime may delay repayment in urgent situations"
      ]
    },
    {
      "id": "flash_loan",
      "name": "Flash Loan",
      "description": "Execute an atomic flash loan from Aave V3 on Base. Borrow without collateral, execute logic, repay principal + 0.05% fee in same transaction. Significantly cheaper gas than Ethereum.",
      "type": "supply",
      "parameters": [
        {
          "name": "receiverAddress",
          "type": "address",
          "required": true,
          "description": "Contract implementing IFlashLoanReceiver with executeOperation()"
        },
        {
          "name": "assets",
          "type": "address",
          "required": true,
          "description": "Array of ERC20 token addresses to flash borrow"
        },
        {
          "name": "amounts",
          "type": "uint256",
          "required": true,
          "description": "Array of amounts to flash borrow for each asset"
        },
        {
          "name": "interestRateModes",
          "type": "uint256",
          "required": true,
          "description": "Array of rate modes. 0 = repay in same tx, 1 = stable debt, 2 = variable debt.",
          "constraints": {
            "enum": [0, 1, 2]
          }
        },
        {
          "name": "onBehalfOf",
          "type": "address",
          "required": true,
          "description": "Address for debt if interestRateMode != 0"
        },
        {
          "name": "params",
          "type": "bytes",
          "required": true,
          "description": "Arbitrary bytes passed to receiver's executeOperation()"
        },
        {
          "name": "referralCode",
          "type": "uint16",
          "required": false,
          "description": "Referral code. Use 0 for no referral.",
          "default": "0"
        }
      ],
      "constraints": {
        "min_amount": "1",
        "supported_tokens": "aave_base_listed_assets",
        "requires_position": false
      },
      "approvals": [
        {
          "type": "erc20_approve",
          "token": "assets",
          "spender": "pool",
          "amount": "exact_or_max"
        }
      ],
      "transaction_flow": [
        {
          "step": 1,
          "action": "check_flash_loan_availability",
          "description": "Verify assets are available for flash loans on Base",
          "contract": "pool_data_provider",
          "method": "getFlashLoanEnabled(address)",
          "conditional": "always",
          "returns": ["flashLoanEnabled"]
        },
        {
          "step": 2,
          "action": "check_receiver_contract",
          "description": "Verify receiver implements IFlashLoanReceiver",
          "contract": "receiverAddress",
          "method": "ADDRESSES_PROVIDER()",
          "conditional": "always",
          "returns": ["addressesProvider"]
        },
        {
          "step": 3,
          "action": "approve_repayment",
          "description": "Receiver must approve Pool to pull back loaned amount + 0.05% fee inside executeOperation()",
          "contract": "assets",
          "method": "approve(address,uint256)",
          "conditional": "inside_receiver_contract"
        },
        {
          "step": 4,
          "action": "execute",
          "description": "Execute the flash loan on Base. Reverts if not repaid.",
          "contract": "pool",
          "method": "flashLoan(address,address[],uint256[],uint256[],address,bytes,uint16)",
          "returns": ["success"]
        }
      ],
      "risk_warnings": [
        "Flash loans require a smart contract receiver — cannot be called from an EOA",
        "Entire transaction reverts if loan + fee not repaid",
        "Flash loan fee is 0.05% of borrowed amount",
        "Base-specific: lower liquidity than Ethereum mainnet may limit available flash loan amounts"
      ]
    }
  ],
  "risk": {
    "audit_status": {
      "audited": true,
      "auditors": [
        "Trail of Bits",
        "SigmaPrime",
        "ABDK Consulting",
        "Certora (formal verification)",
        "PeckShield",
        "OpenZeppelin"
      ],
      "last_audit_date": "2022-12-01",
      "audit_reports": [
        "https://github.com/aave/aave-v3-core/tree/master/audits"
      ]
    },
    "tvl": {
      "current_usd": 1200000000,
      "source": "defillama",
      "last_updated": "2026-03-07T00:00:00Z"
    },
    "incidents": [
      {
        "date": "2022-11-22",
        "severity": "medium",
        "title": "CRV market freeze (Ethereum)",
        "description": "Aave governance froze CRV market on Ethereum after concentrated borrowing. No Base deployment impact. Demonstrates governance responsiveness.",
        "resolved": true,
        "post_mortem": "https://governance.aave.com"
      }
    ],
    "risk_score": {
      "overall": "A",
      "smart_contract": "A+",
      "centralization": "B+",
      "oracle_dependence": "B+",
      "liquidity": "B+"
    }
  },
  "fees": {
    "model": "interest_rate",
    "tiers": [
      {
        "name": "supply_yield",
        "fee_bps": null,
        "description": "Suppliers earn variable yield based on pool utilization. Rates may differ from Ethereum due to different utilization levels.",
        "conditions": "Earned on all supplied assets"
      },
      {
        "name": "variable_borrow",
        "fee_bps": null,
        "description": "Variable borrow rate based on utilization curve. Typically 2-10% APY depending on asset and utilization.",
        "conditions": "interestRateMode = 2"
      },
      {
        "name": "stable_borrow",
        "fee_bps": null,
        "description": "Stable borrow rate — may not be available for all assets on Base.",
        "conditions": "interestRateMode = 1 (limited availability)"
      },
      {
        "name": "flash_loan_fee",
        "fee_bps": 5,
        "description": "0.05% flat fee on flash loan principal",
        "conditions": "Flash loan operations only"
      },
      {
        "name": "reserve_factor",
        "fee_bps": null,
        "description": "Percentage of borrow interest going to Aave DAO treasury (typically 10-20%)",
        "conditions": "Applied automatically to all borrow interest"
      }
    ],
    "gas_estimates": {
      "supply": "150000",
      "withdraw": "160000",
      "borrow": "200000",
      "repay": "170000",
      "flash_loan": "350000",
      "approve": "46000"
    }
  }
}