Fusion Universal Kit

A universal SDK 1inch Fusion+ atomic swap protocol across any EVM and Bitcoin-based chains.

Unite DefiShipped July 25, 2025#defi#infra#security
Repo
Fusion Universal Kit banner

About

Fusion Universal Kit is an atomic swap protocol that enables trustless, decentralized exchanges between Ethereum Virtual Machine (EVM) chains and Bitcoin. Built as an extension of the Fusion+ protocol from 1inch, this kit provides a complete solution for cross-chain asset swaps with enhanced security and user experience.

## 馃攧 How Atomic Swaps Work

The Fusion Universal Kit enables trustless cross-chain swaps through a six-step process that ensures both parties can either complete the swap or recover their funds. The entire process is orchestrated through Hash Time-Locked Contracts (HTLCs) on both chains, creating a secure bridge between EVM and Bitcoin networks.

**Step 1: Order Creation and HTLC Setup**

The swap begins when a maker creates an order specifying the assets they want to exchange. For example, Alice wants to swap 0.001 ETH for 0.0001 BTC. The system generates a unique hashlock (a cryptographic hash of a secret) that will be used to coordinate the swap across both chains. The taker then creates a Bitcoin HTLC using this shared hashlock, which locks the Bitcoin funds in a special address that can only be unlocked by revealing the secret or after a timeout period.

**Step 2: Escrow Deployment and Bitcoin Funding**

Once the Bitcoin HTLC is created, the maker deploys an EVM escrow contract that locks their ETH. This escrow contract uses the same hashlock as the Bitcoin HTLC, creating a cryptographic link between the two chains. The taker then funds the Bitcoin HTLC by sending the specified amount of Bitcoin to the HTLC address. At this point, both assets are locked in their respective chains, but neither party can access the other's funds without cooperation.

**Step 3: Secret Revelation and Asset Claiming**

The critical moment occurs when the maker reveals the secret (the preimage of the hashlock) to claim their Bitcoin from the HTLC. This revelation happens on the Bitcoin network through a special transaction that includes the secret in the witness data. Once the secret is revealed on-chain, it becomes publicly visible to everyone, including the taker.

**Step 4: Cross-Chain Completion**

With the secret now publicly available, the taker can use it to withdraw the ETH from the EVM escrow contract. The escrow contract verifies the secret matches the original hashlock before releasing the funds. This completes the atomic swap - Alice receives her Bitcoin, and Bob receives his ETH, all without requiring trust between the parties or any centralized intermediary.

How it's made

### HTLC Script Structure

The Bitcoin HTLC uses a sophisticated script that enables both claim and refund scenarios:

```

OP_IF OP_SHA256 <hashlock> OP_EQUALVERIFY <receiverPublicKey> OP_CHECKSIG OP_ELSE <locktime> OP_CHECKLOCKTIMEVERIFY OP_DROP <senderPublicKey> OP_CHECKSIG OP_ENDIF ```

### Key Features

  • **P2WSH Address**: Uses native SegWit for better efficiency
  • **Dual Paths**: Supports both claim (with secret) and refund (after timeout)
  • **Time-Locked Refunds**: Automatic refund capability after locktime
  • **Signature Verification**: Secure multi-signature requirements

### Claim Transaction Structure

```

// Witness Stack for Claim: <signature> <secret> <1> <witnessScript> const witnessStack = [ signature, // Receiver's signature secret, // Revealed secret Buffer.from([1]), // Choose IF branch witnessScript // Full HTLC script ]; ```

From the public ETHGlobal showcase page. Votes, swipes and the judge score are hackfeed's own.

AI judge

Not judged yet. A free model reads this page, compares it with similar projects and this event's winners, then scores it and says what would make it win.

Still being built?

Not checked yet.

Swipe stats

0upvotes
0skips
0saves

Discussion 0

No comments yet. Ask the team something, or say what you'd use it for.

Posting as a guest. Plain text, 1,000 characters max.

Already built nearby

Closest projects by meaning and shared words. Similar isn't the same as copied: read them.

Atomic-Inch

A cross-chain atomic swap protocol enabling secure, trustless swaps between Ethereum and Algorand.

Helix Cross-Chain

1inch Cross-chain Swap (Fusion+) that enables trustless atomic swaps Ethereum & Cosmos

FlipPay

Functioning XCM-Swapping between Ethereum - Polkadot verifiable on-chain