Cross-Chain Swap Testing
Test 1inch Fusion+ cross-chain swaps between Base and Arbitrum
Connection Status
Connect your wallet to start swapping
About 1inch Fusion+
1inch Fusion+ is a cross-chain swapping protocol that allows for seamless asset transfers between different blockchains. It uses a unique hashlock mechanism to ensure secure swaps without requiring trust between parties.
This demo allows you to swap ETH from Base to Arbitrum and vice versa, using 1inch's powerful cross-chain infrastructure.

Trustless Cross-Chain Swaps
Execute cross-chain swaps without relying on centralized bridges, using secure hashlock contracts.

MEV Protection
Fusion+ provides protection against MEV (Maximal Extractable Value) attacks, ensuring optimal execution.

Gas Optimization
The protocol optimizes gas costs across multiple chains, providing cost-effective cross-chain swaps.
Hashlock Mechanism
The protocol uses hashlock contracts on both source and destination chains to ensure atomicity of the cross-chain swap. The order creator generates a random secret that can unlock both escrows.
Secret Submission
After escrows are created on both chains and finality locks expire, the secret is submitted to complete the swap. This process ensures that funds are only released when conditions are met on both chains.
Integration Example
// Generate random secret const secret = getRandomBytes32(); const secretHash = HashLock.hashSecret(secret); // Place order with hashlock const orderHash = await sdk.placeOrder(quote, { walletAddress: userAddress, hashLock: HashLock.forSingleFill(secret), secretHashes: [secretHash] }); // Submit secret after finality period await sdk.submitSecret(orderHash, secret);