An atomic swap is a trustless, peer-to-peer exchange of cryptocurrency between two different blockchains — executed in a single atomic operation that either completes fully or reverts entirely, with no possibility of partial execution or one party stealing the other's funds. Atomic swaps represent the theoretical ideal of decentralised cross-chain trading without bridges or custodians. THE "ATOMIC" PROPERTY The word "atomic" in computer science means an operation that is indivisible — it either happens completely or not at all. Traditional cross-chain trading requires trust: you send your crypto first and trust the counterparty to send theirs. An atomic swap eliminates this trust requirement through cryptographic commitment schemes. HOW ATOMIC SWAPS WORK: HASH TIME-LOCKED CONTRACTS (HTLC) Alice wants to swap 1 BTC for 10 ETH with Bob. Alice generates a secret random value (preimage S) and its hash (H = hash(S)). Alice creates a Bitcoin HTLC: "Pay 1 BTC to Bob if he reveals S within 24 hours, otherwise refund Alice." Bob sees the hash H and creates an Ethereum HTLC: "Pay 10 ETH to Alice if she reveals S within 12 hours, otherwise refund Bob." Alice claims the ETH by revealing S — which automatically reveals S to Bob. Bob uses S to claim the BTC. Both transactions succeed or neither does — atomic. WHY ATOMIC SWAPS HAVEN'T REPLACED BRIDGES Technical complexity: Both chains must support compatible hash and time-lock primitives. Bitcoin and Ethereum have this; many chain pairs don't. Liquidity coordination: Finding a counterparty with exactly matching wants is difficult without an order book. Transaction timing: The lock periods require both parties to be online and responsive. Latency: Waiting for multiple confirmations on both chains makes the process slow. Current state: Atomic swaps are most actively used in the Lightning Network (for Bitcoin-to-Bitcoin payment routing) and in cross-chain DEX architectures like THORChain (which uses HTLC-based protocols for native asset swaps across Bitcoin, Ethereum, and other chains).