BTB Finance for agents

Protocols / Lending

Aave V3

The largest multi-chain lending market: supply assets to earn variable interest (receive aTokens), borrow against collateral at variable rates, use e-mode for correlated assets, flash-loan, and use GHO (Aave's stablecoin), Savings GHO (sGHO), AAVE staking and Umbrella aToken staking. Agents call the Pool (or the WrappedTokenGateway for native ETH/POL/AVAX/BNB) and read positions via the data providers or the public Aave V3 GraphQL API.

On-chain + APIEVM61 contractsWebsite · Docs

get_protocol({ "protocol": "aave-v3" })

Risks an agent should know

What an agent can do

supplyLend an ERC-20 and earn interest
ERC-20 approve(Pool, amount); Pool.supply(asset, amount, onBehalfOf=you, 0). Native token: WrappedTokenGatewayV3.depositETH(Pool, you, 0) with msg.value.
withdrawTake supplied assets back
Pool.withdraw(asset, amount or type(uint256).max, to). Native: approve aWETH to the gateway, then gateway.withdrawETH(Pool, amount, to).
borrowBorrow against collateral at a variable rate
Make sure the supplied asset is collateral (setUserUseReserveAsCollateral(asset,true) if needed), check Pool.getUserAccountData(you).availableBorrowsBase, convert to token units with Oracle.getAssetPrice, then Pool.borrow(asset, amount, 2, 0, you). Keep the health factor well above 1e18.
repayRepay a loan
approve(Pool, amount); Pool.repay(asset, amount or type(uint256).max, 2, you). Or repayWithATokens(asset, amount, 2) to repay with your deposits of the same asset.
find aToken / debt token addressesGet the aToken and variable debt token of any reserve
AaveProtocolDataProvider.getReserveTokensAddresses(asset) or Pool.getReserveData(asset).aTokenAddress / variableDebtTokenAddress. List reserves with Pool.getReservesList(). Full lists are in the per-market address-book file (…Assets library).
check health / riskRead a user's position
Pool.getUserAccountData(user) (healthFactor 18 decimals; < 1e18 = liquidatable); per-asset detail via ProtocolDataProvider.getUserReserveData(asset,user) or UiPoolDataProvider.getUserReservesData(provider,user).
e-modeHigher LTV for correlated assets
Read categories via UiPoolDataProvider.getEModes(provider); Pool.setUserEMode(categoryId). 0 exits.
save in GHOEarn the GHO savings rate
approve(sGHO, amount) on GHO; sGHO.deposit(amount, you). Exit any time with sGHO.redeem(shares, you, you).
stake in UmbrellaEarn extra rewards by covering bad debt
approve the StakeToken for its asset() (wrapped aToken or GHO); StakeToken.deposit(assets, you). To exit: cooldown(), wait 20 days, then redeem within the 2-day window.
build tx via APILet Aave build the calldata
POST a GraphQL query to https://api.v3.aave.com/graphql (supply/borrow/repay/withdraw queries) and sign the returned TransactionRequest / ExecutionPlan steps.

Contracts

ethereum · chain id 1

ContractAddressKey functionsTry
Pool (Ethereum Core)
pool · proxy
0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2
source
writesupply(address,uint256,address,uint16)
writewithdraw(address,uint256,address)
writeborrow(address,uint256,uint256,uint16,address)
writerepay(address,uint256,uint256,address)
writerepayWithATokens(address,uint256,uint256)
writesetUserUseReserveAsCollateral(address,bool)
writesetUserEMode(uint8)
readgetUserAccountData(address)
+6 more via get_protocol
Full ABI
PoolAddressesProvider (Ethereum Core)
other
0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e
source
readgetPool()
readgetPriceOracle()
readgetPoolDataProvider()
readgetACLManager()
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Ethereum Core)
other
0x0a16f2FCC0D44FaE41cc54e079281D84A363bECD
source
readgetReserveTokensAddresses(address)
readgetAllReservesTokens()
readgetAllATokens()
readgetUserReserveData(address,address)
readgetReserveConfigurationData(address)
readgetReserveCaps(address)
readgetPaused(address)
readgetReserveData(address)
Full ABI
UiPoolDataProviderV3 (Ethereum Core)
other
0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2
source
readgetReservesData(address)
readgetUserReservesData(address,address)
readgetEModes(address)
readgetReservesList(address)
Full ABI
WrappedTokenGatewayV3 (Ethereum Core)
router
0xd01607c3C5eCABa394D8be377a08590149325722
source
writedepositETH(address,address,uint16)
writewithdrawETH(address,uint256,address)
writeborrowETH(address,uint256,uint16)
writerepayETH(address,uint256,address)
Full ABI
AaveOracle (Ethereum Core)
other
0x54586bE62E3c3580375aE3723C145253060Ca0C2
source
readgetAssetPrice(address)
readgetAssetsPrices(address[])
readBASE_CURRENCY_UNIT()
readgetSourceOfAsset(address)
Full ABI
Pool (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
pool · proxy
0x4e033931ad43597d96D6bcc25c280717730B58B1
source
Full ABI
PoolAddressesProvider (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
other
0xcfBf336fe147D643B9Cb705648500e101504B16d
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
other
0xB85B2bFEbeC4F5f401dbf92ac147A3076391fCD5
source
Full ABI
UiPoolDataProviderV3 (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
other
0x2dAd8162A989cd99D673dE4425Bb2298Db1E1aA2
source
Full ABI
WrappedTokenGatewayV3 (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
router
0x3167C452fA3fa1e5C16bB83Bc0fde4519C464299
source
Full ABI
AaveOracle (Ethereum Prime (address book: AaveV3EthereumLido)) - same interface as the Ethereum Core entry
other
0xE3C061981870C0C7b1f3C4F4bB36B95f1F260BE6
source
Full ABI
AAVE token
token · proxy
0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9
source
readbalanceOf(address)
writeapprove(address,uint256)
writetransfer(address,uint256)
writedelegate(address)
readgetPowerCurrent(address,uint8)
Full ABI
GHO stablecoin
token
0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f
source
readbalanceOf(address)
writeapprove(address,uint256)
writetransfer(address,uint256)
readgetFacilitatorsList()
Full ABI
sGHO (Savings GHO, ERC-4626)
vault · proxy
0xE1753F2e00940cC31213dd92013cF019DFE4ca1d
source
writedeposit(uint256,address)
writeredeem(uint256,address,address)
writewithdraw(uint256,address,address)
readpreviewRedeem(uint256)
readconvertToAssets(uint256)
readmaxWithdraw(address)
readtotalAssets()
Full ABI
stkAAVE (legacy Safety Module, staked AAVE)
staking · proxy
0x4da27a545c0c5B758a6BA100e3a049001de870f5
source
writestake(address,uint256)
writecooldown()
writeredeem(address,uint256)
writeclaimRewards(address,uint256)
readgetTotalRewardsBalance(address)
readgetCooldownSeconds()
readpreviewRedeem(uint256)
Full ABI
stkGHO (legacy Safety Module, being phased out for sGHO / Umbrella stkGHO) - same staking interface as stkAAVE
staking · proxy
0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d
source
Full ABI
Umbrella (core, Ethereum) - users interact with the StakeTokens, not this contract
staking · proxy
0xD400fc38ED4732893174325693a63C30ee3881a8
source
Full ABI
Umbrella StakeToken stkwaUSDC.v1 (Ethereum Core aUSDC)
staking · proxy
0x6bf183243FdD1e306ad2C4450BC7dcf6f0bf8Aa6
source
readasset()
writedeposit(uint256,address)
writecooldown()
readgetStakerCooldown(address)
writeredeem(uint256,address,address)
writewithdraw(uint256,address,address)
readpreviewRedeem(uint256)
Full ABI
Umbrella StakeToken stkwaUSDT.v1 (Ethereum Core aUSDT) - same ERC-4626 StakeToken interface as stkwaUSDC.v1
staking · proxy
0xA484Ab92fe32B143AEE7019fC1502b1dAA522D31
source
Full ABI
Umbrella StakeToken stkwaWETH.v1 (Ethereum Core aWETH) - same ERC-4626 StakeToken interface as stkwaUSDC.v1
staking · proxy
0xaAFD07D53A7365D3e9fb6F3a3B09EC19676B73Ce
source
Full ABI
Umbrella StakeToken stkGHO.v1 (GHO) - same ERC-4626 StakeToken interface as stkwaUSDC.v1
staking · proxy
0x4f827A63755855cDf3e8f3bcD20265C833f15033
source
Full ABI

base · chain id 8453

ContractAddressKey functionsTry
Pool (Base) - same interface as the Ethereum Core entry
pool · proxy
0xA238Dd80C259a72e81d7e4664a9801593F98d1c5
source
Full ABI
PoolAddressesProvider (Base) - same interface as the Ethereum Core entry
other
0xe20fCBdBfFC4Dd138cE8b2E6FBb6CB49777ad64D
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Base) - same interface as the Ethereum Core entry
other
0x0F43731EB8d45A581f4a36DD74F5f358bc90C73A
source
Full ABI
UiPoolDataProviderV3 (Base) - same interface as the Ethereum Core entry
other
0x0C6BC4a12039788be08F87e87Cff87FEDbd1D386
source
Full ABI
WrappedTokenGatewayV3 (Base) - same interface as the Ethereum Core entry
router
0xa0d9C1E9E48Ca30c8d8C3B5D69FF5dc1f6DFfC24
source
Full ABI
AaveOracle (Base) - same interface as the Ethereum Core entry
other
0x2Cc0Fc26eD4563A5ce5e8bdcfe1A2878676Ae156
source
Full ABI
GHO stablecoin (Base, CCIP-bridged) - standard ERC-20
token · proxy
0x6Bb7a212910682DCFdbd5BCBb3e28FB4E8da10Ee
source
Full ABI

arbitrum · chain id 42161

ContractAddressKey functionsTry
Pool (Arbitrum) - same interface as the Ethereum Core entry
pool · proxy
0x794a61358D6845594F94dc1DB02A252b5b4814aD
source
Full ABI
PoolAddressesProvider (Arbitrum) - same interface as the Ethereum Core entry
other
0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Arbitrum) - same interface as the Ethereum Core entry
other
0x243Aa95cAC2a25651eda86e80bEe66114413c43b
source
Full ABI
UiPoolDataProviderV3 (Arbitrum) - same interface as the Ethereum Core entry
other
0x91E04cf78e53aEBe609e8a7f2003e7EECD743F2B
source
Full ABI
WrappedTokenGatewayV3 (Arbitrum) - same interface as the Ethereum Core entry
router
0x5283BEcEd7ADF6D003225C13896E536f2D4264FF
source
Full ABI
AaveOracle (Arbitrum) - same interface as the Ethereum Core entry
other
0xb56c2F0B653B2e0b10C9b928C8580Ac5Df02C7C7
source
Full ABI
GHO stablecoin (Arbitrum, CCIP-bridged) - standard ERC-20
token · proxy
0x7dfF72693f6A4149b17e7C6314655f6A9F7c8B33
source
Full ABI

optimism · chain id 10

ContractAddressKey functionsTry
Pool (Optimism) - same interface as the Ethereum Core entry
pool · proxy
0x794a61358D6845594F94dc1DB02A252b5b4814aD
source
Full ABI
PoolAddressesProvider (Optimism) - same interface as the Ethereum Core entry
other
0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Optimism) - same interface as the Ethereum Core entry
other
0x243Aa95cAC2a25651eda86e80bEe66114413c43b
source
Full ABI
UiPoolDataProviderV3 (Optimism) - same interface as the Ethereum Core entry
other
0x68100bD5345eA474D93577127C11F39FF8463e93
source
Full ABI
WrappedTokenGatewayV3 (Optimism) - same interface as the Ethereum Core entry
router
0x5f2508cAE9923b02316254026CD43d7902866725
source
Full ABI
AaveOracle (Optimism) - same interface as the Ethereum Core entry
other
0xD81eb3728a631871a7eBBaD631b5f424909f0c77
source
Full ABI

polygon · chain id 137

ContractAddressKey functionsTry
Pool (Polygon) - same interface as the Ethereum Core entry
pool · proxy
0x794a61358D6845594F94dc1DB02A252b5b4814aD
source
Full ABI
PoolAddressesProvider (Polygon) - same interface as the Ethereum Core entry
other
0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Polygon) - same interface as the Ethereum Core entry
other
0x243Aa95cAC2a25651eda86e80bEe66114413c43b
source
Full ABI
UiPoolDataProviderV3 (Polygon) - same interface as the Ethereum Core entry
other
0x66E1aBdb06e7363a618D65a910c540dfED23754f
source
Full ABI
WrappedTokenGatewayV3 (Polygon) - same interface as the Ethereum Core entry
router
0xBC302053db3aA514A3c86B9221082f162B91ad63
source
Full ABI
AaveOracle (Polygon) - same interface as the Ethereum Core entry
other
0xb023e699F5a33916Ea823A16485e259257cA8Bd1
source
Full ABI

avalanche · chain id 43114

ContractAddressKey functionsTry
Pool (Avalanche) - same interface as the Ethereum Core entry
pool · proxy
0x794a61358D6845594F94dc1DB02A252b5b4814aD
source
Full ABI
PoolAddressesProvider (Avalanche) - same interface as the Ethereum Core entry
other
0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (Avalanche) - same interface as the Ethereum Core entry
other
0x243Aa95cAC2a25651eda86e80bEe66114413c43b
source
Full ABI
UiPoolDataProviderV3 (Avalanche) - same interface as the Ethereum Core entry
other
0xFBa4Df643205c5400BC3e05a1E67E0dFaEeeb41F
source
Full ABI
WrappedTokenGatewayV3 (Avalanche) - same interface as the Ethereum Core entry
router
0x2825cE5921538d17cc15Ae00a8B24fF759C6CDaE
source
Full ABI
AaveOracle (Avalanche) - same interface as the Ethereum Core entry
other
0xEBd36016B3eD09D4693Ed4251c67Bd858c3c7C9C
source
Full ABI
GHO stablecoin (Avalanche, CCIP-bridged) - standard ERC-20
token
0xfc421aD3C883Bf9E7C4f42dE845C4e4405799e73
source
Full ABI

bnb · chain id 56

ContractAddressKey functionsTry
Pool (BNB Chain) - same interface as the Ethereum Core entry
pool · proxy
0x6807dc923806fE8Fd134338EABCA509979a7e0cB
source
Full ABI
PoolAddressesProvider (BNB Chain) - same interface as the Ethereum Core entry
other
0xff75B6da14FfbbfD355Daf7a2731456b3562Ba6D
source
Full ABI
AaveProtocolDataProvider / PoolDataProvider (BNB Chain) - same interface as the Ethereum Core entry
other
0xc90Df74A7c16245c5F5C5870327Ceb38Fe5d5328
source
Full ABI
UiPoolDataProviderV3 (BNB Chain) - same interface as the Ethereum Core entry
other
0x68100bD5345eA474D93577127C11F39FF8463e93
source
Full ABI
WrappedTokenGatewayV3 (BNB Chain) - same interface as the Ethereum Core entry
router
0x0c2C95b24529664fE55D4437D7A31175CFE6c4f7
source
Full ABI
AaveOracle (BNB Chain) - same interface as the Ethereum Core entry
other
0x39bc1bfDa2130d6Bb6DBEfd366939b4c7aa7C697
source
Full ABI

APIs

Aave V3 GraphQL API (AaveKit API)
auth: none
https://api.v3.aave.com/graphql
Markets, reserves, rates and user positions across all Aave V3 chains, and transaction building: simple queries return a TransactionRequest (to, data, value, chainId); complex ones return an ExecutionPlan (ApprovalRequired first, then the tx; or InsufficientBalanceError). Also sGHO vault previews and deposit/redeem plans. The URL is also a GraphQL playground.

Notes

Every address comes from the official BGD Labs aave-address-book (github.com/bgd-labs/aave-address-book, autogenerated from on-chain governance state; the aave.com docs point to it as the address registry). 'Ethereum Prime' is the market the address book still names AaveV3EthereumLido (its GHO steward is called GHO_AAVE_PRIME_STEWARD). keyFunctions are listed once on the Ethereum Core contracts; all other markets' Pool, PoolAddressesProvider, PoolDataProvider, UiPoolDataProvider, Gateway and Oracle share the same interface. Not listed on purpose: individual aTokens, variable debt tokens, stata tokens and per-asset oracles (hundreds; get them with getReserveTokensAddresses / getReserveData or the …Assets library in each address-book file), PoolConfigurator/ACLManager/Collector/EmissionManager (admin only), UiIncentiveDataProvider and RewardsController (in the address book if you need incentives), swap adapters (ParaSwap/CoW, change often), GHO GSMs (GhoEthereum.sol: GSM_USDC 0x3A3868898305f04beC7FEa77BecFf04C13444112, GSM_USDT 0x882285E62656b9623AF136Ce3078c6BdCc33F5E3 - not added as contracts because their underlying asset could not be re-checked on-chain during research), stkABPT, UmbrellaBatchHelper (0xCe6Ced23118EDEb23054E06118a702797b13fc2F in UmbrellaEthereum.sol; signatures not verified here), and Aave V3 on the ~30 other chains DefiLlama lists (Gnosis, Scroll, Linea, Sonic, zkSync, Mantle, Metis, Celo, Soneium, Plasma, MegaETH, X Layer, Monad, Ethereum EtherFi/Horizon markets, etc.: see AaveV3<Chain>.sol files in the address book). Aave V4 is a separate protocol (api.v4.aave.com) and not covered. All addresses have contract code on their chain (eth_getCode checked for every Ethereum address and every Pool/provider/gateway/oracle/UiPoolDataProvider elsewhere). Signatures come from aave-dao/aave-v3-origin interfaces, bgd-labs/aave-stk-v1-5 (stkAAVE) and Sourcify (Umbrella StakeToken, sGHO implementations). AAVE token and stkAAVE/umbrella use 18 decimals.

Sources

Researched 2026-11-25. Addresses are copied from the official sources above; check them before moving large amounts.