← Back to home

fusion+monad

A 1inch Fusion+ bridge for trustless USDC swaps using a gas-efficient factory pattern.

Problem Statement

Project DescriptionFusion Arteryis a production-aligned, trustless, and bidirectional atomic swap bridge connecting theEthereum SepoliaandMonadtestnets. Built for the1inch Fusion+ bounty, our project enables the seamless and secure transfer ofUSDCbetween these two cutting-edge EVM-compatible ecosystems.Our core mission was not just to build a bridge, but to build it the right way. We have meticulously replicated the sophisticated, gas-efficient factory pattern used in the 1inch production protocol, demonstrating a deep understanding of the architecture required for secure and scalable cross-chain infrastructure.The Problem: Liquidity FragmentationIn the emerging multi-chain world, liquidity is fragmented across diverse blockchain networks. A user with assets on a next-gen chain likeMonadhas no direct, trustless way to deploy that capital on Ethereum without relying on centralized or custodial solutions. This fragmentation leads to inefficiencies, lost opportunities, and security risks.Existing bridges often suffer from:Custodial intermediariesMonolithic, inflexible designsPoor developer experience and user trustOur Solution: A Trustless "Unique Lockbox" SystemFusion Arteryoffers a secure,non-custodial, andatomicpathway for value transfer. A user can initiate a swap of USDC on one chain (e.g., Ethereum Sepolia) and receive the equivalent on the other chain (Monad)atomically, or have the operation revert entirely if incomplete — no third party holds custody at any point.The entire system is governed by smart contracts and an automated off-chain resolver to ensure full safety and transparency.System Components1. On-Chain Smart Contract Architecture (The Foundation)Instead of a monolithic design, we adopted thefactory + proxy patternas used by 1inch — a modular and gas-efficient approach.EscrowFactory.solDeployed once per chain (Ethereum Sepolia and Monad). It creates lightweightEIP-1167 clonesof the escrow contract, acting like a "Lockbox Company" that issues secure, isolated lockboxes for each swap.Escrow.solThe master HTLC (Hashed Timelock Contract) implementation that governs atomicity. It enforces that funds are releasedonlywith a valid secret or refunded after a time-lock expiry. All clones delegate logic to this blueprint.MockUSDC.solA standard ERC20 contract deployed on both chains to simulate a realistic, controlled bridging environment.2. The Off-Chain Resolver (The Automated Heart)A stateless, fault-tolerantNode.jsservice written inTypeScriptthat operates the bridge logic in an automated, non-custodial manner.Stateless & Resilient: Powered byviem, it predicts clone addresses using deterministic logic, avoiding the need for a database or centralized state.Event-Driven Automation: Listens forNewEscrowevents on Ethereum Sepolia and Monad. Upon detection, it deploys the corresponding escrow contract on the destination chain. When the user completes the withdrawal, revealing the secret, the resolver completes the atomic swap by claiming the original funds.3. The Frontend dApp (The Human Layer)Built usingNext.js,wagmi, andviem, the dApp abstracts away complexity and delivers a smooth user experience.Wallet Connection & Swap UI: Users connect wallets, enter the USDC amount, and follow a simple flow — approve and initiate.Live Swap Tracking: The dApp tracks the progress in real-time with explorer links, making it transparent and intuitive for users.Key Technical Highlights & FeaturesProduction-Aligned Architecture: We implemented the same advanced factory pattern used by 1inch in production.Gas Efficiency: Minimal deployment costs usingEIP-1167proxies and immutable variables.Stateless Resolver: Fully restartable and resilient with zero reliance on stateful tracking.Modern Type-Safe Stack: TypeScript, Hardhat, viem — ensuring strong typing, fast iteration, and maintainability.Full Bidirectionality: The bridge supports swaps fromEthereum Sepolia to MonadandMonad to Ethereum Sepolia— atomic in both directions.Future VisionThis hackathon project lays the groundwork for asecure, modular, and extensible cross-chain USDC bridge. Future enhancements will include:Supportingany ERC20 tokenwith generalized factory deployment.Expanding support tomore EVM-compatible chains(e.g., Base, Linea, Polygon zkEVM).Introducing adecentralized resolver networkto eliminate off-chain trust and maximize uptime.Optimizing forMonad's high-throughput environmentwith even leaner gas usage and faster finality.

Solution

Of course. This is the perfect place to showcase your technical decisions and problem-solving process. Here’s a detailed, nitty-gritty breakdown of how the project was built, designed for the hackathon judges.How We Built This: The Nitty-Gritty DetailsOur core philosophy for this hackathon was "Production-Aligned Prototyping." We didn't want to just build something that worked; we wanted to build a scaled-down version of a system that could work in production. This meant studying the 1inch team's own architecture and adapting its core principles to a 48-hour timeline.The Technology StackWe chose a modern, robust, and type-safe stack to maximize development speed and minimize runtime errors.Smart Contracts:Solidity (^0.8.20): The industry standard. We used modern features like immutable state variables for significant gas savings on our Escrow clones.Hardhat: Our development environment of choice. We leveraged its powerful scripting and testing environment, and especially the hardhat-deploy plugin for managing our multi-contract deployments across both Sepolia and Arbitrum Sepolia in a repeatable, deterministic way.OpenZeppelin Contracts: We used the industry-standard Clones library for our gas-efficient EIP-1167 proxy deployments and the ERC20 implementation for our MockUSDC. There's no reason to reinvent the wheel when secure, audited components are available.Off-Chain Resolver:Node.js & TypeScript: For a robust, type-safe backend service.Viem: We chose Viem over Ethers.js for its modern, lightweight design, tree-shakable modules, and excellent TypeScript support. It made handling event logs and interacting with contracts incredibly clean and predictable.Express.js: While the resolver is primarily a background service, we wrapped it in a minimal Express server to provide a simple / health-check endpoint. This makes it easy to verify that the service is running.

Hackathon

ETHGlobal Unite

2025

Contributors