The 1inch Cross-Chain Swap SDK (Fusion+) provides high-level functionality for performing atomic cross-chain swaps between EVM chains. Fusion+ enables swaps across different blockchains without bridges or messaging protocols.
Key Benefits
- No bridges needed — Atomic swaps via escrow contracts on both chains
- MEV Protection — Dutch auction mechanism prevents front-running and sandwich attacks
- Gas cost abstraction — Resolvers pay gas fees on both source and destination chains
- Native token support — Swap directly from ETH, AVAX, BNB, etc. without wrapping
- 13+ supported chains — Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, and more
How Cross-Chain Fusion+ Works
- Sign Order — The SDK generates a cross-chain order specifying source/destination tokens and chains
- Dutch Auction — Resolvers compete to fill your order at the best price
- Escrow Deployment — The winning resolver deploys escrow contracts on both chains
- Secret Reveal — You reveal cryptographic secrets to unlock escrows and finalize the swap
- Assets Delivered — Tokens arrive on the destination chain atomically
Core Methods
- getQuote — Fetches cross-chain pricing, including auction parameters and secret counts
- placeOrder — Signs and submits a cross-chain order for ERC-20 tokens (all-in-one)
- createOrder — Generates an order struct for native token swaps (requires separate submission)
- submitNativeOrder — Submits a native token order to the relayer
- getOrderStatus — Checks order status (pending, executed, expired, refunded)
- getReadyToAcceptSecretFills — Checks if escrows are deployed and ready for secret submission
- submitSecret — Reveals a secret to unlock escrows and finalize the swap
- WebSocketApi — Real-time order status updates as an alternative to polling
Integration Pattern
A typical ERC-20 cross-chain swap follows this flow:
- Initialize SDK — Create an SDK instance with your API key and blockchain provider
- Check Allowance — Ensure the source token is approved for the Aggregation Router
- Fetch Quote — Get cross-chain pricing for your swap
- Generate Secrets — Create cryptographic secrets for escrow locking
- Place Order — Submit the signed order with hashlock and secret hashes
- Monitor & Submit Secrets — Poll for escrow deployment, then reveal secrets to finalize
Interactive Code Example
Explore the complete implementation — this example demonstrates a cross-chain ERC-20 swap: