TronSwap

Cross-chain swap using HTLCs between Ethereum Sepolia and Tron Nile w cool frontend visualization

TronSwap

Created At

Unite Defi

Project Description

A demo of cross-chain atomic swaps: an HTLC smart contract on Tron that interacts with Ethereum, a single config that drives both chains, and a live dashboard that shows each swap step in real time. It includes deploy/test scripts, a small Node backend that streams progress over WebSockets, and a Next.js UI with explorer links—so you can see locks, withdrawals, and refunds as they happen. Built to be simple, reproducible, and easy to adapt to other tokens or networks.

How it's Made

The swap/ project implements cross-chain atomic swaps using matching HTLC contracts on Ethereum Sepolia (ERC-20 with OpenZeppelin SafeERC20/ReentrancyGuard) and Tron Nile (TRC-20 shim with identical function signatures/events), with the EVM swap logic derrived from the 1inch cross-chain logic example and adapted for our HTLC flow. Hardhat + Ignition handle EVM deploys; TronWeb scripts handle Tron. A single config.json (plus env vars) drives RPCs, keys, addresses, confirmations, timelocks, and Tron feeLimit. A Node/Express backend runs the same test runner used in CI and streams WebSocket events (approval→ lock→ withdraw/refund), while a Next.js + Tailwind dashboard renders live progress, logs, and Etherscan/TronScan links.

background image mobile

Join the mailing list

Get the latest news and updates