SuniFi

A cross-chain atomic swap dApp that extends 1inch Fusion+ to Sui

SuniFi

Created At

Unite Defi

Project Description

This project implements a real cross-chain swap protocol that extends 1inch Fusion+ functionality to the Sui blockchain using Hash Time Locked Contracts (HTLC). The system enables trustless atomic swaps between SUI and ETH on Base Sepolia testnet with actual onchain transactions. It follow the following structure;

  1. Smart Contract Layer (docs/htlc_escrow/sources/htlc_escrow.move) HTLC Implementation: Move-based Hash Time Locked Contract Auction Parameters: Enhanced for Fusion+ compatibility Partial Fills: Support for incremental claims Security Features: Timelock protection and hashlock validation

  2. Backend Integration (scripts/real_swap.js) The core swap execution engine with three main client classes:

  3. API Server (scripts/api-server.js) Express.js backend that connects UI to blockchain operations:

  4. React UI (ui/src/) Main Components SwapInterface: Token selection and swap initiation TransactionModal: Displays real transaction details with explorer links WalletConnection: Wallet integration simulation StatusTracker: Real-time swap progress monitoring

How it's Made

This project uses React to connect everything in the front and JavaScript for the back. CSS was used to format and ensure everything makes sense, and in a technical perspective, here's the detail: ✅ Real Blockchain Integration Sui Testnet: Actual HTLC contract deployment and execution Base Sepolia: Real ETH transactions with confirmations Explorer Verification: All transactions visible on testnet explorers ✅ 1inch Fusion+ Integration Official SDK: Using @1inch/fusion-sdk package Real API: Connects to 1inch Fusion+ endpoints Order Management: Create, monitor, and execute orders ✅ Security Features Hashlock Protection: Funds only released with correct secret Timelock Safety: Automatic refund after expiration Transaction Confirmation: Waits for onchain confirmation Error Handling: Comprehensive error messages and recovery ✅ User Experience Real-time Updates: Live transaction status Explorer Links: Direct links to view transactions Error Messages: Clear instructions for common issues Mobile Responsive: Works on all devices

background image mobile

Join the mailing list

Get the latest news and updates