> For the complete documentation index, see [llms.txt](/llms.txt).

# 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[​](#ask-your-agent "Direct link to 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[​](#prerequisites "Direct link to Prerequisites")

- [Quickstart](/agent-wallet/quickstart/) completed
- Sufficient token balance on the source chain

## Browse vaults[​](#browse-vaults "Direct link to 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[​](#check-your-positions "Direct link to Check your positions")

View your current yield positions:

```
mm earn positions

```

## Supply to a vault[​](#supply-to-a-vault "Direct link to Supply to a vault")

Supply tokens to a yield vault:

```
mm earn supply --token <TOKEN> --amount <AMOUNT> [--chain <chain-id>] [--from-chain <chain-id>]

```

| Flag         | Required | Description                           |
| ------------ | -------- | ------------------------------------- |
| --token      | Yes      | Token symbol or contract address      |
| --amount     | Yes      | Human-readable amount to supply       |
| --chain      | No       | Destination chain for the vault       |
| --from-chain | No       | Source chain if supplying cross-chain |

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

## Withdraw from a vault[​](#withdraw-from-a-vault "Direct link to 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[​](#cross-chain-supply "Direct link to 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[​](#common-pitfalls "Direct link to 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.

## Related commands[​](#related-commands "Direct link to Related commands")

- [mm earn](/agent-wallet/reference/commands/#mm-earn) in the commands reference
- [Check balances and prices](/agent-wallet/guides/check-balances-and-prices/)
