Skip to main content

Token Swap

The Swap page is your gateway to exchanging tokens on AchSwap. Our smart routing system finds the best rates across V2, V3, V4, and aggregator pools.

Overview

The swap interface provides:

  • Smart Routing - Automatically finds the best path across all protocols
  • V2, V3 & V4 Support - Leverages all pool types
  • Aggregator - Splits trades across multiple protocols for optimal execution
  • Gasless Swaps - Sign a transaction, relayer pays the gas
  • Price Protection - Configurable slippage tolerance
  • Real-time Quotes - Live price updates

Supported Pool Types

PoolTypeBest For
V2Classic AMMStable pairs, simple swaps
V3Concentrated liquidityVolatile pairs, capital efficiency
V4Hook-enabled singletonCustom logic, new pool types
AggregatorSplit across allBest rate, large trades

How It Works

Basic Swap Flow

  1. Select Tokens

    • Choose the token you're selling ("From")
    • Choose the token you want to receive ("To")
  2. Enter Amount

    • Type the amount or use the max button
    • The other amount updates automatically
  3. Review Trade

    • Exchange rate
    • Price impact
    • Minimum received (after slippage)
    • Route visualization (which protocol/split was selected)
  4. Execute Swap

    • Click Swap
    • Approve in your wallet
    • Wait for confirmation

Exact Output Mode

By default you enter the token you want to send (exact input). You can also enter the token you want to receive (exact output):

  1. Type the amount you want to receive in the To field
  2. The interface estimates the required input in the From field
  3. The transaction is guaranteed to deliver at least the amount you typed, or it reverts

How the input amount is calculated

Exact output is a convenience feature. Behind the scenes the app searches for the input required to produce your desired output:

  • V2 and V3 use native reverse-quote functions.
  • V4 and Aggregator use forward-quote search because they do not expose native reverse quotes.

The From amount shown is the estimated required input. The transaction sends a slightly larger input — the estimate plus your slippage tolerance — to guarantee you receive the exact output you asked for.

Important behavior

  • Slippage is added to the input side. If you set 0.5% slippage, the transaction may send up to 0.5% more input than the estimate to protect against price movement.
  • Aggregator routes are refreshed before execution. The route shown while quoting may be updated to match the buffered input amount that is actually sent.
  • V4 pools with custom hooks are supported, but hooks with dynamic fees can change between quote time and execution time. Your output is still protected by the exact-amount minimum, so the transaction reverts rather than delivering less — but you may need to retry.
  • Tax / fee-on-transfer tokens can trigger a V2 fallback path. The fallback still protects your exact output minimum.

When exact output is unavailable

  • Wrap/unwrap (USDC ↔ wUSDC) is always exact-input because the conversion is 1:1.
  • Gasless swaps currently require exact-input mode.

Gasless Swap Flow

  1. Click the Zap icon to enable gasless mode
  2. If Permit2 is not approved, click Enable Permit2 for Gasless (one-time per token)
  3. Enter swap details
  4. Sign the permit message in your wallet
  5. The relayer submits the transaction and pays the gas
  6. Swap confirmed

See Gasless Swap for full details.

Aggregator Routing

The aggregator automatically splits your trade across multiple protocols to minimize price impact:

  1. Probes each adapter (V2, V3, V4) for the full amount
  2. Tests split ratios (coarse 10% increments, then fine 1% increments)
  3. Selects the split with highest net output
  4. Applies a 0.1% fee on gross output

See Smart Routing for full details.

Interface Guide

Token Selection

┌────────────────────────────────────────────────────────┐
│ From [USDC ▼] │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 0.00 │ │
│ └──────────────────────────────────────────────────┘ │
│ ⇅ (swap button) │
│ To [ACHS ▼] │
│ ┌──────────────────────────────────────────────────┐ │
│ │ 0.00 │ │
│ └──────────────────────────────────────────────────┘ │
│ │
│ Rate: 1 USDC = 2.50 ACHS │
│ Price Impact: 0.05% │
│ Min Received: 2.48 ACHS │
│ │
│ [Swap] │
└────────────────────────────────────────────────────────┘

Settings

Click the gear icon to access swap settings:

SettingDescriptionDefault
Slippage ToleranceMaximum price change accepted0.5%
Transaction DeadlineTime before trade expires20 min
RecipientAddress receiving tokensYour wallet
V2Enable/disable V2 poolsOn
V3Enable/disable V3 poolsOn
V4Enable/disable V4 poolsOn
AggregatorEnable/disable aggregatorOn
Aggregator V2Use V2 adapter in aggregator splitsOn
Aggregator V3Use V3 adapter in aggregator splitsOn
Aggregator V4Use V4 adapter in aggregator splitsOn

Slippage Tolerance

The slippage tolerance protects you from price changes during transaction confirmation:

  • 0.5% - Conservative, for stable pairs
  • 1% - Default, balanced
  • 5% - Aggressive, for volatile pairs

If price moves beyond your slippage tolerance, the transaction will revert.

Price Impact

Price impact shows how your trade affects the pool price:

  • < 0.1% - Minimal impact, large pools
  • 0.1% - 1% - Low impact, moderate trades
  • 1% - 5% - Moderate impact, large trades
  • > 5% - High impact, very large trades

A yellow warning appears when price impact exceeds 15%.

Route Visualization

The swap interface shows your trade route:

USDC → wUSDC → ACHS (V3, 0.3%)

Or for aggregator splits:

60% via V3 (0.3%) + 40% via V4 (0.30%)

This shows the path your tokens take and which protocol was selected.

Supported Tokens

Native Tokens

TokenSymbolAddress
USDCUSDC0x0000...0000 (native)
Wrapped USDCwUSDC0xDe5DB9049a8dd344d...

Project Tokens

TokenSymbolAddress
Achswap TokenACHS0x45Bb5425f293bdd2...

Advanced Features

Wrap/Unwrap

Since USDC is native on ARC Testnet:

  • Wrapping converts native USDC to wUSDC
  • Unwrapping converts wUSDC back to native USDC
  • The interface handles this automatically

Transaction History

Recent swaps are stored locally:

  • View in the "Recent" section
  • Click to see transaction details
  • Clear history option available

RWA Swaps

The swap interface also supports RWA (Real World Asset) token swaps through a dedicated RWA tab. See the AchRWA documentation for details.

Troubleshooting

"Insufficient liquidity"

  • Try a smaller amount
  • The token pair may not have a pool

"Price impact too high"

  • Reduce trade size
  • Increase slippage tolerance (caution!)

Transaction reverted

  • Price moved beyond slippage tolerance
  • Increase slippage or try again later

"No route found"

  • Enable more protocols in settings
  • For V4, ensure the pool is registered on-chain