← Protocols
Aave
01Description

The largest decentralized money market. Aave V3 supports cross-chain liquidity, eMode, isolation mode, GHO stablecoin minting, and one-block flash loans.

02Best for
  • 01supply / borrow money market
  • 02leveraged positions via eMode
  • 03GHO stablecoin minting
  • 04flash loans
  • 05yield-bearing aTokens
03Install
  • pnpm add @aave/contract-helpers @aave/math-utils @bgd-labs/aave-address-book ethers
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_AAVE_MARKETClientMarket identifier from `@bgd-labs/aave-address-book` (e.g. `AaveV3Ethereum`, `AaveV3Base`, `AaveV3Arbitrum`).
RPC_URLServerEVM RPC endpoint for the chain you target (Alchemy, Infura, etc.).
05Prompt snippet
Integrate Aave V3 for lending and borrowing. Resolve `Pool` and asset addresses from `@bgd-labs/aave-address-book` (do NOT hardcode). Use `@aave/contract-helpers` `Pool` service: call `supply({ user, reserve, amount, onBehalfOf })`, `borrow({ user, reserve, amount, interestRateMode: 2, onBehalfOf })`, `repay`, `withdraw`. For health factor and reserve data use `UiPoolDataProvider.getReservesHumanized` and pass to `formatReserves` / `formatUserSummary` from `@aave/math-utils`. For atomic strategies call `Pool.flashLoan` against `POOL` proxy. To enable eMode (correlated assets, higher LTV) call `Pool.setUserEMode(categoryId)`. For GHO mint, borrow GHO from any V3 market where it is listed.
06Gotchas
  • Health factor < 1 triggers liquidation; bots take a 5-10% liquidation bonus, so keep HF buffer (>1.5) when using leverage.
  • eMode raises LTV but restricts you to one correlated asset category; you cannot borrow assets outside that category until you exit eMode.
  • Isolation-mode collateral can only borrow stablecoins listed in the isolation debt ceiling — the ceiling is global per asset, not per user.
  • Aave price oracle uses Chainlink; if a feed deviates or freezes, supply/borrow can pause and liquidations can cascade.
  • Each chain has its own pool, address book entry, and risk parameters — supplying on Ethereum gives you no liquidity on Base.
  • Variable borrow rate (mode 2) is the only supported mode in V3; stable rate was removed.
  • Always approve the `Pool` proxy (not the implementation) before `supply` / `repay`.
  • `aave/aave-utilities` (the home of `@aave/contract-helpers` and `@aave/math-utils`) was archived on GitHub in April 2026 — the npm packages still install but no longer get fixes. Aave's current official SDK is `aave/aave-sdk` (packages `@aave/client` + `@aave/react`); evaluate migrating new integrations.
07Alternatives