Atomic swaps between ETH and BTC extending 1inch Fusion+ with custom Bitcoin HTLC service.
Thunder Portal enables trustless atomic swaps between Bitcoin and Ethereum without bridges or wrapped tokens. We extended 1inch Fusion+ protocol to support native Bitcoin through a custom HTLC service written in Rust.
Key features:
Our solution solves the trust problem in cross-chain swaps by using Hash Time Locked Contracts (HTLCs) on both chains, ensuring either both transactions complete or neither does.
Thunder Portal consists of three main components:
Bitcoin HTLC Service (Rust): Custom service that creates and manages Bitcoin HTLCs, handles script generation, and monitors the Bitcoin testnet3 network.
Ethereum Smart Contracts (Solidity): Factory pattern for deploying escrow contracts that implement HTLC logic on Ethereum Sepolia.
Thunder Portal CLI (TypeScript): Orchestrates the atomic swap process, manages order chunking, and provides user interface.
We extended the 1inch Fusion+ architecture by adding Bitcoin support through our HTLC service. The system ensures atomicity by using the same preimage hash on both chains - revealing the preimage claims both sides of the swap simultaneously.
Notable technical achievements: