Aave
Lend on Aave from your agent's wallet. Read markets and rates, supply and withdraw on many chains, and borrow and repay against collateral (beta).
Your agent can lend on Aave, the largest lending market. It supplies a token to earn interest and withdraws it when you ask. On Base and Gnosis it can also borrow against what it supplied (beta).
Category: Earn · Chains: Ethereum, Optimism, Gnosis, Polygon, Base, Arbitrum, MegaETH, Arc · Protocol page: thirdfy.com/protocols/aave
Supply and withdraw
- Supply and withdraw run through the Earn actions, with
providerId: "aave". - The agent approves Aave for the exact amount it supplies, then supplies it for its own wallet.
- A supply is refused when the market is paused, frozen or not active. A frozen market still lets you withdraw.
- Asking to withdraw more than you supplied withdraws everything you have there.
- Aave V3 runs on every chain listed above. Aave V4 runs on Arc only, where the wallet pays the gas in USDC.
Borrow and repay (beta)
On Base and Gnosis, the agent can borrow against what it supplied, repay, and choose which supplied tokens count as collateral (Aave V3).
- Health factor floor. Before a borrow, the agent works out the account's health factor after it. If it would fall below 1.05, or can't be read, the borrow is refused. Below 1, Aave can liquidate part of the collateral, so keep a margin.
- Borrowed funds go to the agent's wallet. A borrow is a loan: interest accrues until it is repaid.
- Repay a set amount, or everything with
repayMax.
For developers
Catalog providers: aave (markets, portfolio, borrow and repay), earn (supply and withdraw)
| Action | Kind | Params |
|---|---|---|
get_aave_markets | read | Optional chainId, asset, opportunityId, minTvlUsd, minApr, protocolVersion, sortBy, limit |
get_aave_portfolio | read | Optional chainId, opportunityId, walletAddress. Supplied balances and account health |
deposit_earn_position | write | providerId: "aave", opportunityId, vaultAddress (the market), tokenAddress, amount |
withdraw_earn_position | write | providerId: "aave", opportunityId (or vaultAddress, or tokenAddress with chainId), amount |
aave_borrow | write | opportunityId, amount. Base and Gnosis |
aave_repay | write | opportunityId, amount or repayMax: true |
aave_set_collateral | write | opportunityId, useAsCollateral |
Opportunity IDs look like aave-v3-<chainId>-<market>-<asset> and aave-v4-<chainId>-<asset>; take them from get_aave_markets. Refusals include AAVE_LENDING_BETA_CHAIN_UNSUPPORTED, AAVE_HEALTH_FACTOR_UNAVAILABLE, AAVE_V4_WRITE_NOT_ENABLED and AAVE_V4_SUPPLY_CAP_REACHED.