> For the complete documentation index, see [llms.txt](https://archer-bot.gitbook.io/archer.bot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archer-bot.gitbook.io/archer.bot/what-you-can-do/swap-tokens.md).

# Swap Tokens

A swap exchanges one token for another **on the same chain**. Archer fetches a live quote from the best aggregator (Bungee for EVM, Jupiter for Solana), checks your balance and gas, and presents a Confirm/Cancel modal before anything is signed.

## Basic Swaps

* *"Swap 100 USDC for ETH on Arbitrum"*
* *"Swap 0.5 ETH to USDC on Base"*
* *"Buy SOL with 50 USDC on Solana"*

## USD-Denominated Amounts

Don't know the exact token amount? Phrase it in dollars:

* *"Swap $10 worth of ETH to USDC on Base"*
* *"Buy $50 of SOL on Solana"*

Archer fetches the live price, calculates the token amount, and shows you both the USD and token values before confirming.

<figure><img src="/files/O33krHbGlvP9YKWJxr4N" alt="" width="563"><figcaption></figcaption></figure>

## Max / All-In Swaps

* *"Swap all my USDC for ETH on Arbitrum"*
* *"Swap my entire SOL balance to USDC"*

For ERC-20 and SPL tokens, Archer uses your full balance. For native tokens (ETH, SOL, POL, etc.), it automatically reserves a small amount for gas so your transaction can actually execute.

## Relative Amounts

You can also use fractions:

* *"Swap half my ETH for USDC on Base"*
* *"Swap a third of my BONK to SOL"*

Archer reads your current balance and calculates the amount.

## Specifying Slippage

* *"Swap 100 USDC to ETH on Arbitrum with 1% slippage"*

Default slippage is 0.5%. You can override it per-transaction. Minimum is 0.1%, maximum is 50%.

## What Happens When You Confirm

1. Archer fetches a fresh quote (quotes typically expire in 60–90 seconds)
2. The aggregator (Bungee or Jupiter) returns the best route across DEXs
3. Archer prepares the unsigned transaction
4. You see a Confirm/Cancel modal showing: input amount, expected output, route, slippage, gas estimate, TVR fee
5. On confirm, you sign with your embedded wallet (or the server signs in a Privy TEE if you've enabled it)
6. Archer submits the transaction and reports the result back in the thread

## Sample Output Structure (MCP / API)

When called via MCP, `prepare_swap_tx` returns a structured payload:

```json
{
  "status": "OK",
  "transactionRequest": {
    "to": "0x...",
    "data": "0x...",
    "value": "0",
    "chainId": 42161,
    "signingTarget": "primary"
  },
  "humanSummary": "Swap 100 USDC to ETH on Arbitrum",
  "expectedOutput": {
    "token": "ETH",
    "amount": "0.0298",
    "amountUsd": "100.00"
  },
  "route": "Bungee → Uniswap V3",
  "slippageBps": 50,
  "gasEstimateUsd": "0.04",
  "tvrFeeUsd": "0.10",
  "expiresAt": "2026-04-28T14:32:18Z"
}
```

## Supported Chains

Swaps are supported on every chain Archer covers. See [Supported Tokens & Networks](/archer.bot/reference/supported-tokens-and-networks.md).
