fusion-plus-cosmos

1inch Fusion Plus protocol in CosmWasm to enable cross chain swaps between ethereum and cosmos

fusion-plus-cosmos

Created At

ETHGlobal New Delhi

Project Description

We've successfully extended the existing 1-inch Fusion Plus protocol to the Cosmos ecosystem by implementing it in CosmWasm. This brings the battle-tested cross-chain atomic swap technology to Cosmos chains, enabling seamless token swaps between Ethereum and any Cosmos-based blockchain supporting cosmwasm without relying on bridges or complex IBC connections.

How it's Made

We built this by adapting the proven 1-inch Fusion Plus protocol to work with CosmWasm, essentially taking battle-tested EVM smart contracts and translating them into Rust for the Cosmos ecosystem.

The Core Architecture: We created three main smart contracts in Rust using CosmWasm 1.4:

  1. EscrowFactory - The orchestrator that deploys and manages all escrow contracts
  2. EscrowSrc - Handles the source side of swaps (like when someone wants to swap ATOM for ETH)
  3. EscrowDst - Manages the destination side (like when someone swaps ETH for ATOM)

Cross-Chain Coordination: When someone wants to swap 50 USDC (Ethereum) for 200 ATOM (Cosmos), here's what happens:

  1. Resolver calls our factory's create_escrow_dst method on Cosmos, locking 200 ATOM
  2. Resolver fills the order on Ethereum (using the existing 1inch protocol), which locks 50 USDC
  3. Both contracts use the same cryptographic secret (hashlock) for atomic coordination
  4. When the secret is revealed, both sides unlock simultaneously

Why This Works: We maintained the same security model as 1inch - including timelocks, safety deposits, and fee distribution - but adapted it for CosmWasm's native token handling and message passing system. The result is the same trustless atomic swaps, just now available between Ethereum and any Cosmos chain.

background image mobile

Join the mailing list

Get the latest news and updates