Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Trustless BTC Swaps

Miners and winning traders convert I0 back into real Bitcoin — and new traders acquire I0 with Bitcoin — using Hash Time-Locked Contracts (HTLCs), the same atomic swap primitive used by the Lightning Network.

No bridge, multisig, or centralized exchange sits between the two parties.

Atomic Swap Flow

Alice (I0 Seller) eyezero Chain Bitcoin L1 Bob (BTC Buyer) 1. Match offer on Entmoot (10,000 I0 for 0.05 BTC) 2. HTLC_LOCK 10k I0 (H, T+18) 3. Lock 0.05 BTC (H, T+6) 4. Claim 0.05 BTC, revealing secret S on Bitcoin 5. HTLC_CLAIM 10k I0 with revealed secret S

Walkthrough

  1. Match on Entmoot: Alice posts an offer on Entmoot’s peer-to-peer orderbook (10,000 I0 for 0.05 BTC). Bob accepts and shares his pubkey.

  2. Alice locks I0: Alice generates a random 32-byte secret S, computes H = SHA256(S), and submits HTLC_LOCK on eyezero payable to Bob upon revealing S, with a refund timeout at T + 18 Bitcoin blocks.

  3. Bob locks real BTC: Once Alice’s lock confirms on eyezero, Bob locks 0.05 BTC on Bitcoin L1 in a standard Taproot or P2WSH HTLC script (OP_SHA256 <H> OP_EQUAL) payable to Alice, with a shorter timeout at T + 6 Bitcoin blocks.

  4. Alice claims BTC: Alice spends Bob’s Bitcoin HTLC by placing S in the transaction witness, receiving 0.05 BTC directly in her Bitcoin wallet.

  5. Bob claims I0: Because S is now public on Bitcoin L1, Bob submits HTLC_CLAIM(swapId, S) on eyezero. Every browser checks SHA256(S) == H and releases Alice’s 10,000 I0 to Bob.

Safety Guarantees

The eyezero timeout (T + 18) is always strictly longer than the Bitcoin timeout (T + 6), giving Bob at least a 12-block window (about two hours) to observe S on Bitcoin and claim his I0. If either party abandons the swap before step 4, both locks refund automatically.

Because verification depends only on SHA256(S) == H, browsers verify HTLC claims permanently inside ord’s sandbox without needing any external Bitcoin UTXO API.