Bi-directional atomic swaps between Ethereum USDC and Sui SUI tokens using HTLC smart contracts
Cross-Chain Atomic Swap Protocol: Ethereum USDC ↔ Sui SUI Project Overview This is a decentralized cross-chain atomic swap protocol that enables secure, trustless token exchanges between Ethereum (Sepolia testnet) and Sui (Devnet) blockchains. The protocol specifically handles swaps between USDC tokens on Ethereum and SUI tokens on Sui using Hash Time-Locked Contracts (HTLCs) to ensure atomicity and security. Core Technology Stack Blockchains Ethereum (Sepolia Testnet): Source/destination for USDC tokens Sui (Devnet): Source/destination for SUI tokens Smart Contracts Ethereum: Solidity contracts (EscrowFactory, Resolver) for HTLC implementation Sui: Move contracts (cross_chain_escrow) for HTLC implementation
How It Works
Technology Stack & Architecture Core Technologies Blockchain Infrastructure Ethereum (Sepolia Testnet): Used for USDC token operations and HTLC smart contracts Sui (Devnet): Used for SUI token operations and Move-based HTLC contracts Ethers.js v6: Ethereum interaction library for wallet connections, transaction signing, and contract calls Sui Client SDK: Official Sui JavaScript SDK for Move contract interactions and transaction management Frontend Framework Next.js 14: React framework with App Router for server-side rendering and optimal performance TypeScript: Type-safe development throughout the entire stack Tailwind CSS: Utility-first CSS framework for responsive, modern UI design React Hooks: useState, useEffect for state management and side effects Wallet Integration RainbowKit: Ethereum wallet connection with support for MetaMask, WalletConnect, and other popular wallets Sui DApp Kit: Official Sui wallet integration supporting Sui Wallet, Ethos, and other Sui-compatible wallets Custom Hooks: useWallet() and useSuiWallet() for unified wallet state management