Atomic Swap
Trustless exchange between different blockchains without intermediary — HTLC protocol.
Atomic swap is a technique for direct cryptocurrency exchange between different blockchains without intermediary — using Hash Time-Locked Contracts (HTLC).
How it works: 1. Alice wants to exchange BTC for ETH with Bob 2. Alice generates secret preimage (random number) and its hash 3. Alice sends BTC to HTLC: "Bob can take if he reveals preimage within 48h" 4. Bob sends ETH to HTLC: "Alice can take if she reveals preimage within 24h" 5. Alice reveals preimage to take ETH → Bob sees preimage on-chain 6. Bob uses preimage to take BTC 7. Exchange atomically — either both get, or neither gets
HTLC (Hash Time-Locked Contract):
Where used:
Limitations:
Thorchain alternative: