How to swap and bridge tokens with MetaMask Agent Wallet: 9 key tips
Your agent can swap or bridge tokens from one sentence. Understand how it fills from quotes, slippage, routes, and more.
- MetaMask
- The swap surface, broken down
- 1. Quote first, and treat "unavailable" as a normal answer
- 2. Set a slippage tolerance instead of trusting the default
- 3. Cross-chain bridges need a destination chain, and refuel has a specific failure mode
- 4. Compare routes deliberately, then execute a specific one
- 5. Gasless execution and batched approvals happen automatically, not by request
- 6. Know that the swap itself, not a separate step, is what Guard Mode checks
- 7. Don't blindly rerun execute after a timeout
- 8. There's no dry run for swaps—comparing quotes is the closest equivalent
- 9. Check chain and gasless support before quoting
- What Agent Wallet doesn't do for swaps
MetaMask Agent Wallet swaps tokens on the same chain and bridges them across chains through the mm swap command set. A trader asks their agent to trade or move tokens in plain language, and the agent routes that request to the commands that fetch a quote, compare routes, and execute. Unlike perpetual futures trading on Agent Wallet, where only the collateral deposit is an EVM transaction MetaMask checks, a swap or bridge is itself the transaction—which changes what a trader needs to specify upfront and what MetaMask's wallet-level controls actually see.
That handoff is where agent-driven trading differs from tapping through an interface. A single sentence can carry a lot of unstated assumptions about slippage tolerance, routing, and destination chain. This piece covers the details worth making explicit.
This is a trading-mechanics guide, not a swaps primer. For how slippage works and how to size a tolerance, see what is slippage. For how market and limit orders compare, including how a slippage tolerance is the closest AMM equivalent to a limit order, see crypto order types. For how DEXs, aggregators, and wallet-native swaps differ, see best crypto swaps platforms in 2026. For the wallet category itself, see what is an agentic wallet and how agentic wallets work. For sizing collateral deposits and knowing which step of a trade MetaMask actually checks in a different asset class, see how to trade perps with MetaMask Agent Wallet.
The swap surface, broken down
These are the commands a swap or bridge workflow leans on. Knowing the surface makes it easier to phrase a request that lands the way it's intended.
What you ask your agent
What runs
What it does
"Swap 0.1 ETH to USDC"
mm swap quote
Prices a same-chain swap without submitting it
"Bridge 10 USDC from Base to Arbitrum"
mm swap quote --to-chain-id
Prices a cross-chain route without submitting it
"Show me all the routes, ranked by cost"
mm swap quote --all-quotes
Returns every ranked candidate route
"Go ahead with that quote"
mm swap execute --quote-id
Submits the previously quoted trade
"Swap and don't ask me to confirm"
mm swap quote --yes
Quotes and executes immediately, skipping confirmation
"What's happening with that swap"
mm swap status --quote-id
Checks execution status
Source: MetaMask Agent Wallet commands reference
With that basic understanding, here are 9 tips for using MetaMask Agent Wallet to swap and bridge tokens, including tokenized stocks and other assets (often called real world assets or RWAs).
1. Quote first, and treat "unavailable" as a normal answer
mm swap quote prices a trade without submitting it. mm swap execute can also take the same swap parameters directly and quote-then-execute in one call, but running the quote separately first is the safer default: it's the only way to see the price, route, and fees before anything signs. When the underlying bridge or DEX aggregator can't find a route, the CLI doesn't throw a hard error—it returns a soft kind: "unavailable" result with a reason (such as AMOUNT_TOO_LOW, SLIPPAGE_TOO_HIGH, or NO_QUOTES), a message, and a hint.
That distinction matters for an agent acting on a prompt. An unavailable quote is an answer to work with—the agent can widen slippage, adjust the amount, or try a different token—not a failure to report back verbatim. The one exception is the transient QUOTE_RETRY signal, which is a genuine hard error worth retrying as-is. Either way, an agent should never fabricate or reuse a quoteId to call execute after a quote comes back unavailable or expired; the execute step fails cleanly, but no transaction gets submitted on a guess.
2. Set a slippage tolerance instead of trusting the default
mm swap quote accepts --slippage as a percentage from 0 to 100, and defaults to 0.5% when omitted. That default is a reasonable middle ground, but it's still a default applied to every trade regardless of the token's liquidity.
As what is slippage covers, a tight tolerance protects against unfavorable fills but causes more quotes to fail outright in volatile conditions, while a loose one fills more reliably at a worse price. A prompt trading a deep-liquidity pair like ETH to USDC can reasonably lean on the 0.5% default; a prompt trading a thin-liquidity token is better off stating a tolerance explicitly, in either direction, rather than inheriting a number that was never chosen with that token in mind.
3. Cross-chain bridges need a destination chain, and refuel has a specific failure mode
Adding --to-chain-id is what turns a same-chain swap into a cross-chain bridge; when it's omitted, the destination defaults to the source chain. --to-address lets the output land somewhere other than the signer's own wallet, but only on cross-chain routes—it has no effect when the source and destination chain are the same.
--refuel bundles a small amount of destination-chain native gas into a cross-chain quote, which is useful when the trader holds no gas token on the destination chain yet. It's opt-in and cross-chain only, and it has one specific way to fail: using it when the destination token already is the destination chain's native gas asset (for example, bridging ETH to Arbitrum ETH) returns NO_QUOTES. A prompt like "bridge USDC from Base to Arbitrum and make sure I have some ETH there to work with" describes exactly this flag; a prompt bridging directly into a chain's native token doesn't need it and will fail if it's added anyway.
4. Compare routes deliberately, then execute a specific one
--all-quotes returns every ranked candidate route with the recommended one marked, ranked by --strategy (comma-separated cost, speed, impact, output; the default is cost,speed). Comparing routes and executing a specific --quote-id afterward is a two-step process, and it's a deliberate one: --all-quotes cannot be combined with --yes, so a prompt asking to see every route and also skip confirmation is asking for two things the CLI won't do in the same call.
Quote artifacts are pruned automatically after 24 hours, so a route worth comparing today isn't a route that's still valid to execute against next week.
5. Gasless execution and batched approvals happen automatically, not by request
When the wallet's native balance can't cover gas, mm swap execute automatically routes eligible, gas-included quotes through a gasless relay using EIP-7702, deducting the relay fee from the swapped token itself. There's no flag for this; it's a fallback the CLI applies on its own to quotes that qualify, not a guarantee on every low-gas swap.
Separately, on eligible chains and accounts, the CLI combines the ERC-20 approval and the trade into one atomic call using ERC-7821 batch execution, which the response reports as route: "erc7821" when it happens. When batching isn't available, the CLI falls back to submitting sequentially. Neither behavior needs to be requested in a prompt, but both are worth knowing about when reading back what actually executed—a batched, gasless swap and a two-step, gas-paying swap can both satisfy the same request, and the response fields are how to tell which one happened. NOTE: Gasless execution can result in higher fees.
6. Know that the swap itself, not a separate step, is what Guard Mode checks
This is the opposite pattern from perpetual futures trading on Agent Wallet, where opening or closing a Hyperliquid position happens off-chain and only the collateral deposit is an EVM transaction MetaMask evaluates. A swap or bridge has no such split: mm swap execute submits the trade directly as an EVM transaction, so it's the transaction that Guard Mode's rolling 24-hour outflow limit meters, and it's what MetaMask's threat scanning and network, address, and token allowlists evaluate directly.
A $2,000 swap counts as a $2,000 outflow against the rolling limit the moment it confirms, whether it's a same-chain trade or a cross-chain bridge. If it exceeds the limit, or threat scanning flags it, the job pauses in AWAITING_MFA for 2-factor authentication approval—a MetaMask Mobile push notification for QR sign-ins, or an email link for browser sign-ins—and the agent can't proceed until someone responds. This applies to server-wallet mode; trading modes don't apply to bring-your-own-wallet setups. The practical upshot: sizing discipline on a swap prompt isn't a separate habit from what the wallet already enforces, the way it is with a perps deposit—the swap amount itself is the number Guard Mode is watching.
7. Don't blindly rerun execute after a timeout
A swap can pause for 2-factor authentication before a transaction hash exists, entering an AWAITING_MFA state with a polling ID attached. If the MFA poll times out on a gasless relay leg or a sequential server-wallet leg, that surfaces as RELAY_TIMEOUT or JOB_TIMEOUT, both carrying the same recovery hint: run mm wallet requests watch to retrieve the hash, and don't call execute again while the original job may still complete.
Re-running execute in that window risks a second, redundant submission rather than fixing anything. Approving the pending request and watching the job is the correct recovery path.
8. There's no dry run for swaps—comparing quotes is the closest equivalent
Unlike mm perps open, which accepts --dry-run to validate an order without signing it, mm swap execute has no equivalent preview mode. The closest thing to rehearsing a swap is requesting a quote and, for anything non-routine, pulling --all-quotes to see the full set of candidate routes before committing to one. Neither substitutes for a dry run in the strict sense—a quote can still go stale, and market conditions can shift between quoting and executing—but it's the tool available for catching a mis-specified request before it signs anything.
9. Check chain and gasless support before quoting
mm chains list returns a features field per chain, which includes whether swap is supported there, and a relaySupported flag indicating whether gasless relay is available. Checking this before quoting saves a round trip: a quote request against a chain without swap support, or an assumption that gasless execution will kick in on a chain where relay isn't supported, surfaces as an error only after the fact rather than something that could have been ruled out first.
This pairs with two swap-specific error codes worth recognizing: GASLESS_UNSUPPORTED means the relay isn't available on that chain, and INSUFFICIENT_GAS means the wallet's native balance can't cover gas and no gasless fallback applied. Both trace back to the same chain-support question mm chains list answers upfront.
What Agent Wallet doesn't do for swaps
Being clear about the boundary is more useful than implying a wider one.
There's no recurring or scheduled swap built in—no native dollar-cost-averaging feature, no automatic rebalancing across a portfolio, and no standing limit-order book the way a centralized exchange might offer. Each mm swap call is a single quote-and-execute cycle; anything recurring is a script or agent loop calling that cycle on a schedule, not a wallet feature. Traders wanting that kind of standing logic can build it as a plugin, a beta feature that lets an installed npm package add new commands to the CLI under consent-gated capabilities, but that's a build-it-yourself path rather than a built-in one.
There's no cross-DEX best-execution guarantee beyond what the quote step reports. --all-quotes and --strategy surface ranked candidates, but the ranking reflects the routes available at quote time, not a guarantee that a better price won't appear moments later.
Slippage protection is a ceiling on acceptable price movement, not protection against the underlying trade being a bad idea. A swap that clears its slippage tolerance can still execute at a price the trader wouldn't have chosen in hindsight; the tolerance only bounds how far the fill can drift from the quote.
Frequently asked questions about swapping and bridging with MetaMask Agent Wallet
- mm chains list returns the authoritative, current set for a given CLI version, along with a features field showing whether swap is supported per chain and a relaySupported flag for gasless eligibility.
mm chains list returns the authoritative, current set for a given CLI version, along with a features field showing whether swap is supported per chain and a relaySupported flag for gasless eligibility.
- No, and the difference is worth knowing. On perps, only the Hyperliquid deposit is an EVM transaction MetaMask checks; opening or closing the position itself isn't. A swap or bridge has no such split—mm swap execute is itself the EVM transaction, so it's checked directly against the outflow limit, threat scanning, and allowlists.
No, and the difference is worth knowing. On perps, only the Hyperliquid deposit is an EVM transaction MetaMask checks; opening or closing the position itself isn't. A swap or bridge has no such split—mm swap execute is itself the EVM transaction, so it's checked directly against the outflow limit, threat scanning, and allowlists.
- That's the CLI's normal response when a bridge or DEX can't generate a route for an actionable reason—the response includes kind: "unavailable", a reason such as AMOUNT_TOO_LOW or SLIPPAGE_TOO_HIGH, and a hint for what to adjust. Only the transient QUOTE_RETRY signal is a genuine hard error.
That's the CLI's normal response when a bridge or DEX can't generate a route for an actionable reason—the response includes kind: "unavailable", a reason such as AMOUNT_TOO_LOW or SLIPPAGE_TOO_HIGH, and a hint for what to adjust. Only the transient QUOTE_RETRY signal is a genuine hard error.
- No. It's opt-in and cross-chain only, and it fails with NO_QUOTES when the destination token is already the destination chain's native gas asset, since there's nothing to refuel in that case.
No. It's opt-in and cross-chain only, and it fails with NO_QUOTES when the destination token is already the destination chain's native gas asset, since there's nothing to refuel in that case.
- Not directly. mm swap execute has no dry-run flag, and it can even take swap parameters directly and execute without a prior quote at all. Requesting a quote first, and comparing routes with --all-quotes for anything non-routine, is the closest available check before committing.
Not directly. mm swap execute has no dry-run flag, and it can even take swap parameters directly and execute without a prior quote at all. Requesting a quote first, and comparing routes with --all-quotes for anything non-routine, is the closest available check before committing.
- It enters an AWAITING_MFA state with a polling ID attached. If the wait times out on a gasless relay or sequential server-wallet leg, that surfaces as RELAY_TIMEOUT or JOB_TIMEOUT. Either way, approve the pending request, then run mm wallet requests watch <polling-id> to retrieve the transaction hash. Re-running execute while the original job may still complete risks a duplicate submission rather than resolving anything.
It enters an AWAITING_MFA state with a polling ID attached. If the wait times out on a gasless relay or sequential server-wallet leg, that surfaces as RELAY_TIMEOUT or JOB_TIMEOUT. Either way, approve the pending request, then run mm wallet requests watch <polling-id> to retrieve the transaction hash. Re-running execute while the original job may still complete risks a duplicate submission rather than resolving anything.
- No. When the wallet's native balance can't cover gas, mm swap execute automatically routes eligible, gas-included quotes through a gasless relay and deducts the fee from the swapped token; it's not guaranteed on every low-gas swap, only ones the quote qualifies for. The response reports route: "erc7821" when the CLI also batched the approval and trade into one call. Neither behavior is flag-gated.
No. When the wallet's native balance can't cover gas, mm swap execute automatically routes eligible, gas-included quotes through a gasless relay and deducts the fee from the swapped token; it's not guaranteed on every low-gas swap, only ones the quote qualifies for. The response reports route: "erc7821" when the CLI also batched the approval and trade into one call. Neither behavior is flag-gated.
- MetaMaskMetaMask, formerly Consensys Software Inc, is the world's largest self-custodial financial platform, giving people a single place to hold, spend, save and grow their money across both crypto and traditional assets. The company is building the consumer platform where that happens, bringing payments, savings, investing and digital assets together in one seamless experience. Having grown from the world's most widely used self-custodial wallet, MetaMask gives users direct control over their money and assets, with reach across approximately 190 countries. MetaMask has played a foundational role in Ethereum's growth since 2016. Today, MetaMask sits at the center of the onchain economy, building the operating system for Open Money and putting people in full control of their financial lives.Read all articles
MetaMask, formerly Consensys Software Inc, is the world's largest self-custodial financial platform, giving people a single place to hold, spend, save and grow their money across both crypto and traditional assets. The company is building the consumer platform where that happens, bringing payments, savings, investing and digital assets together in one seamless experience. Having grown from the world's most widely used self-custodial wallet, MetaMask gives users direct control over their money and assets, with reach across approximately 190 countries. MetaMask has played a foundational role in Ethereum's growth since 2016. Today, MetaMask sits at the center of the onchain economy, building the operating system for Open Money and putting people in full control of their financial lives.
- GUIDESWhat is open interest in perps and why does it matter?Learn how open interest works, key differences from volume, common misinterpretation risks, and steps for using OI data responsibly.
What is open interest in perps and why does it matter?
Learn how open interest works, key differences from volume, common misinterpretation risks, and steps for using OI data responsibly.
- GUIDES5-cent spreads in prediction markets: liquidity, costs, and trading signalsExplore what it actually costs to enter and exit a prediction market position, and why the 5-cent spread matters.
5-cent spreads in prediction markets: liquidity, costs, and trading signals
Explore what it actually costs to enter and exit a prediction market position, and why the 5-cent spread matters.
- GUIDESTop crypto analytics and real-time data tools in 2026Explore how the leading onchain intelligence, dashboards, fundamentals, derivatives, sentiment, and portfolio trackers compare.
Top crypto analytics and real-time data tools in 2026
Explore how the leading onchain intelligence, dashboards, fundamentals, derivatives, sentiment, and portfolio trackers compare.
