About
Project Overview
We built a trustless cross-chain swap protocol between Ethereum and Scroll, inspired by the 1inch Fusion architecture. Our system enables users to swap native assets across chains without needing to trust a third party, central bridge, or shared custodian. The design incorporates hashed time-locked contracts (HTLCs), resolvers, partial fills, and time-based refunds, along with real-time price quoting via 1inch and Chainlink.
This protocol serves as a foundation for gasless, atomic, cross-chain swaps with built-in protections for both sides of the trade.
Core Features (Completed)
HTLC-Based Atomic Swaps Swaps are executed through hash time-locked contracts (HTLCs) on both chains. A swap only completes when both sides lock funds using the same hashlock, and the secret is revealed before the timelock expires. If not, users can claim a refund. This ensures that funds are either securely swapped or returned, without risk of loss. To maintain security and prevent premature secret exposure, the swap secrets are also stored on the frontend, allowing users to retain control while enabling resolvers to unlock their respective portions only when appropriate.
Relayers and Resolvers
Orders are created and signed off-chain by users, then propagated by relayers to ensure broad visibility. Relayers play a critical role by monitoring the cross-chain escrow states—verifying that funds are securely locked on both Ethereum and Scroll before sharing the relevant secrets with resolvers. Resolvers then compete to fill the orders by submitting transactions to the on-chain swap contracts and paying the associated gas fees, enabling a gasless user experience. This coordination between relayers, resolvers, and users ensures swaps are executed atomically and trustlessly.
Partial Fills and Secret Management
Orders can be partially filled by one or more resolvers, improving capital efficiency and liquidity by allowing flexible, incremental execution of swaps. To securely manage multiple partial fills without revealing secrets prematurely, we implemented a Merkle tree of secrets. Each partial fill corresponds to a leaf in the Merkle tree, allowing resolvers to reveal only the specific secret needed to unlock their portion of the swap. This structure maintains the security of the overall hashlock, preventing front-running or early secret exposure while enabling granular, trustless partial executions.
Refund Mechanism
If an order is not filled within the specified deadline, users can reclaim their funds via the built-in refund mechanism, further enhancing trustlessness.
Pricing Integration
Since direct ETH-to-Scroll token pricing is not available from a single source, we combine multiple oracles to ensure accurate and manipulability-resistant pricing. Chainlink provides reliable on-chain price feeds for ETH to USDC. 1inch API is then used to fetch a quote for USDC to the target token on Scroll. By composing these two sources, we generate end-to-end swap pricing across chains in a way that is both reactive to market conditions and resistant to manipulation.
Planned but Incomplete Features (At Time of Submission) Dual-Escrow Atomic Cross-Chain Locking: We designed a trustless mechanism where escrowing funds on one chain would automatically trigger escrow on the other chain. This system was intended to use cross-chain messaging (e.g., LayerZero) to ensure atomic dual-locking and dual-withdrawal. This would have removed the need to rely on off-chain behavior by resolvers and made cross-chain swaps even more secure. While the architecture was scoped and partially implemented, we did not complete it in time for submission.
Trust-Based Dutch Auction Mechanism:
We also planned to implement a Dutch auction variation where resolvers would earn or lose reputation based on their reliability. Those who mishandled or failed to refund orders would accumulate "distrust points," resulting in a slower reward curve in future auctions. This would incentivize long-term honest behavior and create a dynamic, self-regulating ecosystem. The concept was designed, but not yet implemented in the final build.
Use Cases:
Seamless, decentralized token swaps between Ethereum and Scroll Gasless UX where users sign orders and resolvers handle execution Programmable swap execution with native token support A foundation for future fully trustless cross-chain DEX infrastructure
Technical Stack:
Solidity smart contracts (HTLC, partial fills, escrow) Foundry (Forge) for testing and deployment Node.js backend for order propagation and relayer logic 1inch Quote API and Chainlink Price Feeds for pricing Scroll and Ethereum as connected networks
This project is a minimal but powerful framework for secure and flexible cross-chain swaps. While our initial goal included advanced features like dual escrow and trust-scored auctions, our final submission focuses on delivering a functional, gasless swap system with strong guarantees of atomicity, refundability, and price reliability.
We believe this system lays the groundwork for the next generation of cross-chain trading protocols, combining composability, trust minimization, and efficient capital flow.
From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.






