project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

Bubble Bridge

Cross-chain swaps made simple: a lightweight HTLC framework for atomic token transfers.

Bubble Bridge

Created At

Unite Defi

Project Description

This project implements a lightweight cross-chain swap framework based on Hash Time-Locked Contracts (HTLCs), enabling secure and trustless token transfers between heterogeneous blockchains like Ethereum and Sui. The system is designed to be modular, developer-friendly, and secure by design.

It consists of: 1- A smart contract layer on both chains (e.g., EVM and Sui) that handles locking, claiming, and refunding of tokens based on hash preimages and timeouts. 2- A TypeScript SDK that simplifies hash lock generation, balance checking, HTLC creation, and transaction monitoring. 3- Testing and simulation scripts to deploy and verify HTLC functionality in local or testnet environments. 4- A planned browser-based UI to let users initiate atomic swaps without interacting directly with the contract layer.

How it's Made

The project is built with Move and Solidity smart contracts to implement HTLC logic on Sui and Ethereum, respectively. On the Sui side, the Move contract handles Coin<T> types, time locks, and swap state. The contract securely holds tokens in escrow within the Swap<T> struct and releases or refunds them based on hash preimages and timeouts.

While Balance<T> is often used for holding coins in system modules, this project intentionally uses Coin<T> directly in the Swap struct to preserve atomicity and simplicity. By allowing Coin<T> in struct fields (via #[allow(lint(coin_field))]), the contract provides a minimal and auditable HTLC design tailored for cross-chain interaction scenarios.

The developer tooling is written in TypeScript using the Sui SDK, and leverages: 1- ts-sdk/htlc/ modules for lockHtlc(), claimHtlc(), and refundHtlc() functions 2- utils.ts for hash preimage generation and local keystore handling 3- A modular deployment structure (deployments/{network}/{timestamp}.json) to track deployments and objects 4- A shell script to check and aggregate gas balances across gas coins

I designed this framework to be easy to audit and extend. I avoided over-engineering and kept it hackathon-friendly, focusing on functionality and cross-chain interoperability. Authentication is currently local via private keys, and interaction is CLI- and SDK-based for now.

A planned web frontend (React + Wagmi + Sui Connect) will provide a clean UI for real users.

background image mobile

Join the mailing list

Get the latest news and updates