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
Walkthrough
-
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.
-
Alice locks I0: Alice generates a random 32-byte secret
S, computesH = SHA256(S), and submitsHTLC_LOCKon eyezero payable to Bob upon revealingS, with a refund timeout atT + 18Bitcoin blocks. -
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 atT + 6Bitcoin blocks. -
Alice claims BTC: Alice spends Bob’s Bitcoin HTLC by placing
Sin the transaction witness, receiving 0.05 BTC directly in her Bitcoin wallet. -
Bob claims I0: Because
Sis now public on Bitcoin L1, Bob submitsHTLC_CLAIM(swapId, S)on eyezero. Every browser checksSHA256(S) == Hand 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.