Search projects, hackathons, sponsors and tech

    ← All projects

    etfusion

    Extend 1inch Fusion+ to Tron: Bidirectional ETH↔TRX swaps with HTLC & timelock

    Demo

    About

    This project extends 1inch's Fusion+ protocol to enable bidirectional token swaps between Ethereum and Tron, preserving hashlock and timelock functionality for secure, atomic cross-chain swaps. **Core Innovation:** - First Fusion+ extension to non-EVM chain (Tron) - Dual-chain architecture: Hardhat (Ethereum) + TronWeb (Tron) - Cross-chain resolver coordinates both chains seamlessly - Preserves all Fusion+ security features (hashlocks, timelocks, partial fills) **Hackathon Requirements Met:** ✅ Hashlock and timelock functionality preserved for non-EVM (Tron) implementation ✅ Bidirectional swap capability (ETH ↔ TRX) ✅ On-chain execution demonstrated on testnets (Sepolia + Nile) ✅ Partial fills supported via Merkle tree secrets **Technical Architecture:** - Ethereum Side: Uses 1inch LOP on Sepolia testnet - Tron Side: Custom HTLC contracts on Nile testnet - Cross-Chain Resolver: Node.js script coordinating both chains - Fusion+ Integration: SDK for order creation and WebSocket monitoring **Demo Flow:** 1. User creates ETH→TRX swap via 1inch Fusion+ SDK 2. Resolver deploys escrows on both chains with same hashlock/timelock 3. Atomic swap executes: secret revealed on both chains simultaneously 4. On-chain verification via block explorers This demonstrates the first successful extension of 1inch Fusion+ to a non-EVM blockchain while maintaining all security guarantees and enabling true cross-chain interoperability.

    How it's made

    **Technology Stack:** - Smart Contracts: Solidity 0.8.19 (Ethereum) + Solidity (Tron) - Development: Hardhat (Ethereum) + TronWeb (Tron) - Cross-Chain: Node.js resolver with 1inch Fusion+ SDK - Testing: Comprehensive test suite with Chai/Mocha **Key Technical Components:** 1. **Dual-Chain Architecture:** - Ethereum: Hardhat + ethers.js + 1inch LOP - Tron: TronWeb + custom HTLC contracts - Cross-chain coordination via Node.js resolver 2. **Fusion+ Integration:** - 1inch Fusion+ SDK for order creation and monitoring - WebSocket API for real-time order tracking - Merkle tree secrets for partial fills support 3. **Smart Contract Innovation:** - EthereumEscrowFactory.sol: Deploys escrows on Sepolia - TronEscrowFactory.sol: Deploys escrows on Nile - Both implement identical HTLC logic with SHA-256 hashlocks 4. **Cross-Chain Resolver:** - Monitors 1inch Fusion+ orders via WebSocket - Deploys corresponding escrows on both chains - Coordinates secret submission for atomic swaps - Handles partial fills and error recovery **Hacky Solutions:** - Used Gnosis as proxy destination for Tron in 1inch SDK (since Tron not natively supported) - Implemented custom TronWeb integration for non-EVM chain - Created dual deployment system: Hardhat for Ethereum, TronWeb for Tron - Built cross-chain secret coordination mechanism **Partner Technologies:** - 1inch Fusion+ SDK: Leveraged for order creation and monitoring - TronWeb: Used for Tron blockchain interaction - Hardhat: Ethereum development and testing framework **Security Features:** - SHA-256 hashlocks on both chains - Timelock-based cancellation - Reentrancy protection - Comprehensive error handling - Atomic swap guarantees The project successfully extends 1inch's Fusion+ protocol to Tron while maintaining all security properties and enabling true cross-chain interoperability between EVM and non-EVM chains.