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:
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.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "AAVE_SUPPLY" |
amount | string | Yes | Amount in human-readable units (e.g. "100" for 100 USDC) |
assetTicker | string | One of assetTicker or tokenAddress | Token ticker as listed in pool config (e.g. "USDC", "WBTC") |
tokenAddress | string | One of assetTicker or tokenAddress | ERC-20 token contract address (0x…) |
decimals | number | No | Required when using tokenAddress; auto-detected when using assetTicker |
referralCode | number | No | Aave referral code (0–65535) |
poolAddress | string | No | Override pool address; auto-resolved from BCReader if omitted |
Alternative schema (by token address)
3. Withdraw
Withdraw previously supplied tokens from the Aave pool back to the Safe.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "AAVE_WITHDRAW" |
amount | string | Yes | Amount in human-readable units |
assetTicker | string | One of assetTicker or tokenAddress | Token ticker |
tokenAddress | string | One of assetTicker or tokenAddress | ERC-20 token contract address |
decimals | number | No | Required when using tokenAddress |
poolAddress | string | No | Override pool address; auto-resolved if omitted |
4. Check positions
After supplying, check your Aave positions and accrued yield:
The response pools array contains an AAVE provider entry. Each item includes:
| Field | Description |
|---|---|
tokenAddress | Underlying asset address |
symbol | aToken symbol (e.g. aBasUSDC) |
baseBalance | Amount initially deposited |
currentBalance | Current balance including accrued yield |
gain | Yield earned (currentBalance - baseBalance) |
gainPct | Yield percentage |
apr | Current annual percentage rate |
apy | Current annual percentage yield |
method | "AAVE_INDEX" — computed via scaledBalanceOf + liquidity index |