EVM → EVM

Introduction

This guide shows how to perform a cross-chain swap between two EVM-compatible chains (for example Ethereum to Arbitrum, BNB Chain to Polygon, or Base to Optimism) using 1inch Fusion+. Because both source and destination chains share the same EVM account model, the entire flow stays within a single secret-revealing pattern — no Solana keypairs, no SvmSrcEscrowFactory transaction, and no announceOrder() step. The whole swap can be driven from one EVM signer with sdk.placeOrder() and the resolver fills the order on the destination chain once you reveal the secret.

Before You Start

  • You must have a valid 1inch API Key. You can get one from the 1inch Business.
  • Your wallet must have at least $1 of USDC on the source chain

Integration Pattern

  1. Initialize SDK - Create an SDK instance with your API key and blockchain provider
  2. Check Allowance - Ensure the source token is approved for the Aggregation Router
  3. Fetch Quote - Get cross-chain pricing for your swap
  4. Generate Secrets - Create cryptographic secrets for escrow locking
  5. Place Order - Submit the signed order with hashlock and secret hashes
  6. Monitor & Submit Secrets - Poll for escrow deployment, then reveal secrets to finalize

Interactive Code Example

Explore the minimal quick-start implementation:

For a more comprehensive example with balance checks and config-driven chain selection, see src/swap-erc20-cross-chain.ts in the same project.

Did you find what you need?