SuiResolver

Trustless Crosschain Swap DApp for SUI and ETH inspired by One Inch Fusion + Atomic Swaps Model

SuiResolver

Created At

ETHGlobal New Delhi

Project Description

In this cross-chain swap design, both the requester and the resolver lock their tokens into HTLCs (Hash Time-Locked Contracts) on their respective chains, each escrowed under the same hash lock but with different timelocks — the resolver’s expiring first to prevent abuse. Once both escrows are verified on-chain, the relayer coordinates the process by requesting the secret (preimage) from the requester and securely forwarding it to the resolver. With the secret, the resolver can claim the requester’s locked funds while simultaneously releasing their own escrowed funds to the requester, ensuring atomic settlement. If either side fails to act, timelocks allow refunds, and since the relayer only transmits the secret without ever holding custody, the system remains trustless and secure.

How it's Made

This project is a cross-chain DApp connecting Ethereum (via Anvil/Foundry) and Sui (local devnet) using dual-sided HTLC escrows. On Ethereum, the escrow logic is implemented in Solidity and tested locally with Foundry, while on Sui, a matching HTLC module in Move handles the counterpart escrow. Both use the same hashLock and ordered timelocks to ensure atomic swaps and safe refunds. A Node.js relayer service monitors local HTLC events on both chains, verifies locks, and requests the secret from the requester before forwarding it to the resolver, enabling atomic settlement. For development and testing, all components run locally via Docker Compose, with a local orderbook API storing signed intents off-chain, reducing on-chain interactions and allowing end-to-end testing without deploying to testnets or mainnet.

background image mobile

Join the mailing list

Get the latest news and updates

SuiResolver | ETHGlobal