Search
⌘K
Intent Swap (Fusion)
API version: All versions
Introduction
Quick start
Quick Start - Ethereum
Quick Start - Solana
Orders
Get gasless swap active orders GET
Get settlement contract address GET
Get order status by hash GET
Get multiple orders by hashes POST
Get orders by maker address GET
Get cancelable orders GET
Quoter
Get quote for token swap GET
Get quote with custom auction presets POST
Build Fusion order from quote POST
Relayer
Submit a signed Fusion order POST
Submit multiple signed Fusion orders POST
Migration
Migration from v1.0 to v2.0
SDK
Solana
Overview
Filling and canceling Solana Fusion order
WebSocket API
EVMs
Overview
Swapping a Native Token to ERC-20
Swapping with Permit2
WebSocket API
Docs·APIs·Swap API·Intent Swap (Fusion)·SDK·EVMs·Swapping a Native Token to ERC-20

Swapping a Native Token to ERC-20

With Intent Swap, you can swap a chain's native token (like ETH on Ethereum) to any ERC-20 token. This is ideal for users who hold only native tokens and want to acquire other assets without first wrapping them manually.

How It Works

Native token swaps require an additional on-chain step compared to ERC-20 swaps:

  1. Create Order - The SDK generates a FusionOrder with optimal auction parameters
  2. Submit to Relayer - Use submitNativeOrder() to register the order with the resolver network
  3. Deploy Escrow - Use NativeOrdersFactory to deploy an escrow contract that holds your native token
  4. Automatic Wrapping - The escrow wraps your native token (e.g., ETH → WETH) and locks it
  5. Order Execution - Resolvers compete to fill your order at the best price
  6. Direct Delivery - The destination token is transferred directly to your wallet

If no resolver fills the order before expiry, the escrow returns your native token.

Key Differences from ERC-20 Swaps

  • No approval needed - Native tokens don't require ERC-20 approval
  • Escrow deployment required - You must send a transaction to deploy the escrow contract
  • Small gas cost - The escrow deployment costs a small amount of gas (~0.001 ETH)

Interactive Code Example

Explore the complete implementation — this example demonstrates swapping native ETH for USDC on Ethereum mainnet:

Did you find what you need?