For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Earn with yield vaults

Browse yield vaults, supply tokens, and withdraw positions using the mm earn commands. Agent Wallet routes supply and withdraw operations through LiFi for cross-chain support.

Ask your agent

You (to your agent): "Show me the best yield vaults for USDC on Base"
You (to your agent): "Supply 100 USDC to a vault on Base"
You (to your agent): "Withdraw all my USDC from the Aave vault on Base"

Your agent lists available vaults, compares APYs and TVL, confirms your choice, then executes.

Prerequisites

  • Quickstart completed
  • Sufficient token balance on the source chain

Browse vaults

List available yield vaults with APY and TVL data:

mm earn markets [--chain <chain-id>] [--protocol <protocol>] [--min-tvl <amount>]

Filter by chain, protocol, or minimum TVL to find the best opportunities.

Check your positions

View your current yield positions:

mm earn positions

Supply to a vault

Supply tokens to a yield vault:

mm earn supply --token <TOKEN> --amount <AMOUNT> [--chain <chain-id>] [--from-chain <chain-id>]
FlagRequiredDescription
--tokenYesToken symbol or contract address
--amountYesHuman-readable amount to supply
--chainNoDestination chain for the vault
--from-chainNoSource chain if supplying cross-chain

The CLI automatically handles ERC-20 approval when the vault's allowance is insufficient.

Withdraw from a vault

Withdraw tokens from a yield vault:

mm earn withdraw --token <TOKEN> --amount <AMOUNT> [--chain <chain-id>]

Use --amount all to withdraw your full position. For Aave rebasing aTokens, --amount all applies a small dust buffer to avoid revert from interest accrual between the query and the transaction.

Cross-chain supply

Supply from a different chain than the vault's chain by passing --from-chain:

mm earn supply --token USDC --amount 100 --chain 8453 --from-chain 1

This bridges and supplies in a single operation.

Common pitfalls

Approval required

When supplying for the first time, the CLI sends an ERC-20 approval transaction before the supply transaction. In server-wallet mode, this may require 2FA approval depending on your trading mode.

Withdraw reverts

If a full withdrawal reverts, retry with a slightly smaller amount. Rebasing tokens (like Aave aTokens) accrue interest between the balance query and transaction execution.