IBExWalletAPI
Blockchain Operations

Aave Lending

Supply tokens to Aave lending pools or withdraw them back to a Safe wallet.

Supply tokens to Aave lending pools to earn yield, or withdraw them back to your Safe wallet.

Uses the two-step POST /v1.2/safes/operations → PUT /v1.2/safes/operations flow.

1. Discover available Aave pools

Retrieve active Aave pools for the target chain:

GET /v1.2/safes/vaults?provider=AAVE
Header: X-Blockchain-Id: 421614

Each pool object contains poolAddress, assetTicker, apy, tvl, isDefault, supplyToken (the token you deposit), borrowToken, and metadata with poolContract and market.

2. Supply (deposit)

Deposit tokens into an Aave lending pool.

{
  "type": "AAVE_SUPPLY",
  "amount": "100",
  "assetTicker": "USDC"
}
FieldTypeRequiredDescription
typestringYesMust be "AAVE_SUPPLY"
amountstringYesAmount in human-readable units (e.g. "100" for 100 USDC)
assetTickerstringOne of assetTicker or tokenAddressToken ticker as listed in pool config (e.g. "USDC", "WBTC")
tokenAddressstringOne of assetTicker or tokenAddressERC-20 token contract address (0x…)
decimalsnumberNoRequired when using tokenAddress; auto-detected when using assetTicker
referralCodenumberNoAave referral code (0–65535)
poolAddressstringNoOverride pool address; auto-resolved from BCReader if omitted

Alternative schema (by token address)

{
  "type": "AAVE_SUPPLY",
  "amount": "0.5",
  "tokenAddress": "0x1234…",
  "decimals": 18
}

3. Withdraw

Withdraw previously supplied tokens from the Aave pool back to the Safe.

{
  "type": "AAVE_WITHDRAW",
  "amount": "50",
  "assetTicker": "USDC"
}
FieldTypeRequiredDescription
typestringYesMust be "AAVE_WITHDRAW"
amountstringYesAmount in human-readable units
assetTickerstringOne of assetTicker or tokenAddressToken ticker
tokenAddressstringOne of assetTicker or tokenAddressERC-20 token contract address
decimalsnumberNoRequired when using tokenAddress
poolAddressstringNoOverride pool address; auto-resolved if omitted

4. Check positions

After supplying, check your Aave positions and accrued yield:

GET /v1.2/users/me/pools
Header: X-Blockchain-Id: 421614

The response pools array contains an AAVE provider entry. Each item includes:

FieldDescription
tokenAddressUnderlying asset address
symbolaToken symbol (e.g. aBasUSDC)
baseBalanceAmount initially deposited
currentBalanceCurrent balance including accrued yield
gainYield earned (currentBalance - baseBalance)
gainPctYield percentage
aprCurrent annual percentage rate
apyCurrent annual percentage yield
method"AAVE_INDEX" — computed via scaledBalanceOf + liquidity index

Full example

{
  "safeAddress": "0xSAFE…",
  "chainId": 421614,
  "operations": [
    {
      "type": "AAVE_SUPPLY",
      "amount": "100",
      "assetTicker": "USDC"
    }
  ]
}

On this page