MultiZap
Atomic swaps between Ethereum and Starknet via Dutch auctions and HTLC-based trustless escrows.
Problem Statement
MultiZapis a fully-functional prototype forcross-chain Dutch-auction-based atomic swapsbetweenEVM (Ethereum Sepolia)andStarknet (Sepolia).It extends the1architecture by enablingtrustless token swaps between L1 and L2 chains, powered by off-chain agents and HTLC smart contracts. Users can swap tokens (like USDC) across Ethereum and Starknet without relying on centralized bridges or custodians.At the heart of the system is aDutch auction mechanismthat allows resolvers (off-chain liquidity providers) to bid competitively on user-submitted swap orders. The winning resolver deposits liquidity on both chains into time-locked, hash-locked escrows. This ensures atrust-minimized atomic swap, where either both sides are executed or none are.🧩 System Components🔗Smart Contractson both Ethereum and Starknet:HTLC escrow contractsEscrow factory contracts for deterministic deployments🛰Relayer Service(Node.js backend):Manages order bookRuns Dutch auctionsExposes APIs for frontend and resolvers🛠Resolver Bot:Computes bids for Dutch auctionsDeploys escrows on both chainsCoordinates settlement and secret revelation💻Frontend DApp:Allows users to create cross-chain swap ordersTracks order and escrow statusInteracts with relayer and wallet providers (Metamask, ArgentX)🔐 Why It Matters✅No Bridges: Swaps are native and require no centralized bridge.🔒Fully Trustless: Uses hash-locked and time-locked escrows to ensure atomicity.🔧Composable: Resolver and relayer logic are modular and extendable to any token or chain.⚙️1inch Fusion+ Upgrade: Makes existing L1 DEX infrastructure usable for Starknet ↔ Ethereum flows.📈 Example Use CaseAlice wants to swap 100 USDC from Ethereum to Starknet. She places a swap order using the frontend.The relayer runs a Dutch auction for resolvers to compete in fulfilling her swap.The winning resolver deposits 100 USDC on Starknet and locks 100 USDC on Ethereum in an HTLC.Alice claims her funds on Starknet by revealing a secret, which the resolver then uses to claim their funds on Ethereum.
Solution
MultiZapis built using a modular architecture with on-chain HTLC escrows and off-chain coordination for Dutch auctions and swap execution.Technologies UsedSolidity + Foundryfor EVM smart contracts (HTLCEscrowFactory,HTLCEscrow)Cairo 1.0 + Starklifor Starknet contracts with equivalent escrow logicReact + TypeScriptfrontend withethers.jsandstarknet.jsfor dual-chain wallet supportNode.js (Express)backend as theRelayer, which:Manages swap orders and Dutch auctionsExposes REST APIs to frontend and resolversResolver Botwritten in Node.js:Polls relayer for ordersBids in auctionsDeploys escrows and handles claims on both chainsIntegrations & Benefits1inch Fusion+ modelextended cross-chain with HTLCs and off-chain biddingKeccak-based HTLC coordinationbetween Solidity and Cairo (no bridges used)Factory patternfor deterministic escrow address predictionNotable HacksDutch auction logic is entirely off-chain for gas efficiencySecrets are revealed by users and reused by resolvers to complete swaps atomicallyFully trustless design with no dependency on centralized relayers or bridges
Hackathon
ETHGlobal Unite
2025
Contributors
- 0xNilesh
15 contributions
- sumithprabhu
6 contributions