← Back to home

1millimeter

1Millimeter Exchange is a cross chain swap platform for Ethereum to ICP swaps.

Problem Statement

1 millimeter Exchange is a web-based cross-chain DEX that lets anyone swap assets between Ethereum Holesky and the Internet Computer in a single click. 
Powered by 1inch Fusion+ intents, an on-chain ICP ↔ ETH bridge and atomic HTLC escrow, every swap is permissionless, MEV-protected and either completes or fully reverts. 
The frontend is a lightweight React dApp—connect MetaMask, confirm, done.

Solution

1 millimeter Exchange – Technical Deep-DiveProject GoalProvide a seamless, trust-minimised bridge for value between Ethereum (Holesky) and the Internet Computer. The user experience must resemble a single-chain swap: connect MetaMask, sign once, and watch funds arrive on the other chain without juggling RPCs or bridges.Tech Stack| Layer | Technology | Purpose | |-------|------------|---------| |Smart Contracts| Solidity 0.8.x | Escrow, Hash-Time-Lock, Fusion Resolver, ICP Bridge contracts | | | Motoko / Rust canisters | ICP-side resolver & ledger interactions | |Intents| 1inch Fusion+ | MEV-proof limit-order execution on the ETH side | |Relayer| Node 18, ethers.js, @dfinity/agent | Listens for escrow events, forwards proofs cross-chain, triggers ICP canisters | |Frontend| React 18, Vite, TailwindCSS | Single-page dApp with wallet hooks | | | canvas-confetti | Visual confirmation burst on swap completion | | | react-icons | Chain & token glyphs |Deployment Targets• EthereumHoleskytest-net (verified source code)• Internet Computer main network (canister IDs baked into build)Scripts / Toolinggenerate-config.sh– bootstraps every.envfrom one promptdeploy-holesky.sh– Foundry script deploying all ETH contracts and writing addresses to diskverify-deployment.sh– Hardhat + Etherscan API verification helpermonitor-system.sh– bash script hitting health endpoints (relayer & RPC status)Key FeaturesIntent-Based Swaps– users post intents executed by off-chain solvers; the Fusion Resolver enforces price and deadline on-chain.HTLC Safety Net– both sides must reveal the same secret within their time-lock window; otherwise funds automatically refund.Progress Overlay– centre-screen modal shows staged messages (sign → swapping → almost done → success tick).Token Lore & Onboarding Panels– gamified educational panels flanking the swap UI.Challenges & Solutions| Challenge | Solution | |-----------|----------| | Bridging two execution environments (EVM vs IC) | Lightweight relayer using @dfinity/agent to sign ingress messages and submit proofs back to ETH. | | Preserving UX despite cross-chain latency | 10-second staged overlay keeps the user informed while the relayer completes the remote leg. | | MEV protection on L2 test-net | Leveraged 1inch Fusion+ Dutch-auction intents which are natively resistant to sandwich attacks. | | Handling two wallet paradigms | MetaMask for ETH, Internet Identity for ICP, stitched together with a shared React context so components can queryethConnected/icpConnected. | | Gas optimisation | Foundry benchmarks drove inline assembly in the resolver, achieving < 190 k gas per swap intent fulfilment. |Future WorkMulti-hop routing (e.g. Holesky → Base → ICP)Zero-knowledge proofs replacing HTLCs for lower latencyMobile wallet deep-links & WalletConnect 2.0© 2024 1 millimeter Labs

Hackathon

ETHGlobal Unite

2025

Contributors