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

Using Thirdfy, show Aave USDC markets on Base and their supply rates.
Using Thirdfy, supply 50 USDC to Aave on Base.
Using Thirdfy, show my Aave position and health on Base.
Using Thirdfy, withdraw 20 USDC from Aave on Base.
  • 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).

Using Thirdfy, borrow 10 USDC on Aave on Base against my WETH.
Using Thirdfy, repay all my USDC debt on Aave on Base.
  • 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)

ActionKindParams
get_aave_marketsreadOptional chainId, asset, opportunityId, minTvlUsd, minApr, protocolVersion, sortBy, limit
get_aave_portfolioreadOptional chainId, opportunityId, walletAddress. Supplied balances and account health
deposit_earn_positionwriteproviderId: "aave", opportunityId, vaultAddress (the market), tokenAddress, amount
withdraw_earn_positionwriteproviderId: "aave", opportunityId (or vaultAddress, or tokenAddress with chainId), amount
aave_borrowwriteopportunityId, amount. Base and Gnosis
aave_repaywriteopportunityId, amount or repayMax: true
aave_set_collateralwriteopportunityId, 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.

MCP
CLI
walletExecute { action: "deposit_earn_position", chainId: 8453, runMode: "agent_wallet",
  estimatedAmountUsd: 50, params: { providerId: "aave", opportunityId: "<from get_aave_markets>",
  vaultAddress: "<market>", tokenAddress: "<USDC>", amount: "50" } }