Atomic Swap
Last Updated: November 16, 2026
An atomic swap is a direct, peer-to-peer trade of two cryptocurrencies, usually on different blockchains, that either completes for both sides or does not happen at all. No centralized exchange or other intermediary holds the funds. Each side locks its coins in a contract that only the agreed trade can unlock.
Atomic swaps enable peer-to-peer trading between different blockchains, such as Bitcoin and Litecoin, by using Hash Time-Locked Contracts (HTLCs). Users keep control of their coins throughout the trade instead of depositing them with a third-party platform.
How an Atomic Swap Works
An HTLC is a script with two locks. The hash lock releases the coins to whoever reveals a secret that matches a published hash. The time lock returns the coins to the sender if nobody claims them before a deadline. Bitcoin’s BIP 199 documents this kind of script.
A typical swap between Alice and Bob runs like this:
- Alice picks a secret and shares only its hash with Bob.
- Alice locks her coins on the first chain in an HTLC tied to that hash, with a refund to her after 48 hours.
- Bob checks Alice’s contract, then locks his coins on the second chain with the same hash and a 24-hour refund.
- Alice claims Bob’s coins by revealing the secret, which makes it public on the second chain.
- Bob copies the secret and claims Alice’s coins. If either side stops early, the time locks return the coins.
The person who starts the swap gets the longer deadline, so the other side always has time to claim after the secret appears. Both chains must support the same hash function and time locks. Coins without scripts, such as Monero, need a different method based on adaptor signatures.
A Short History
A developer known as TierNolan described the protocol in a Bitcointalk thread called “Alt chains and atomic transfers,” started on May 2, 2013. The Bitcoin Wiki credits TierNolan for the step-by-step version it uses. On September 20, 2017, Decred announced the first cross-chain atomic swap between Decred and Litecoin, one of the first public on-chain swaps, along with tools for swaps between DCR, BTC and LTC.
The same HTLC idea runs the Lightning Network, which routes payments through chains of HTLCs, and the swap services that move bitcoin between Lightning and the main chain.
Atomic Swaps vs Liquidity-Pool Cross-Chain Swaps
Most cross-chain swaps made today do not use atomic swaps. They run through liquidity pools, bridges or solvers instead:
| Feature | Atomic swap | Liquidity-pool cross-chain swap |
|---|---|---|
| Counterparty | One specific trader | A pool of funds run by the protocol |
| Who holds funds during the trade | No one: each side’s own HTLC | The protocol’s vaults, contracts or bridge |
| What you receive | The native coin | The native coin or a wrapped token, depending on the design |
| Speed | Slow, with confirmations on two chains | Usually faster |
| Price | Agreed between the two traders | Set by the pool, with fees and slippage |
| Main risks | Missed deadlines, software bugs, the free option | Hacks of vaults, bridges or contracts |
THORChain is often called an atomic swap platform, but it works differently. Its documentation says it lets users “swap native assets on their native blockchains” through continuous liquidity pools. The funds sit in vaults controlled by its validator nodes, so users trust those vaults during the trade rather than a hash lock.
Example: Atomic Swap Services in 2026
The time lock mattered in 2026. Boltz, a non-custodial swap service built around Lightning and bitcoin, said on X on August 3, 2026 that it would stay disabled until further notice, as it was being actively targeted by attackers. It said no user funds were ever at risk and that unilateral refunds would keep working because they “do not depend on our infrastructure.”
Our guide to cross-chain atomic swaps covers other 2026 tools, including Bitcoin to Monero swaps.
Where to Check an Atomic Swap
Each half of a swap is an ordinary transaction, so it appears in the block explorer of its chain: first the funding transaction, then either a claim that reveals the secret or a refund after the time lock. Swap apps usually show the hash and both deadlines before you commit funds.
Why Atomic Swaps Matter
Atomic swaps support decentralization by letting people trade across chains without a centralized exchange. There is no account to open and no custodian, although each side still pays network fees on its own chain.
They also have limits. Liquidity is thin, since you need a counterparty for the exact pair and amount, and the trades are slow.
The person who starts a swap can also walk away if the price moves against them. A 2019 paper by Runchao Han, Haoyu Lin and Jiangshan Yu showed that an atomic swap works like an American call option without a premium. They put that premium at 2% to 3% of the asset value for cryptocurrencies.
Frequently Asked Questions
What is an atomic swap in crypto?
An atomic swap is a trade of two cryptocurrencies, often on different blockchains, in which both transfers happen or neither does. Each side locks its coins in a hashed timelock contract. The secret that lets one trader claim also lets the other claim, and a time limit refunds both sides if the trade is not finished.
Are atomic swaps safe?
The hash lock and time lock design removes the need to trust an exchange or a counterparty with your coins. The practical risks sit around it: bugs in swap software, attacks on swap services, sending to a wrong address, or missing a claim or refund deadline. Prices can also move while a slow swap waits for confirmations on two chains.
What is the difference between an atomic swap and a bridge?
An atomic swap trades your coin for someone else’s coin on another chain, so you receive the native asset and no one holds the funds in between. A bridge moves your own asset to another chain, usually by locking it and minting a wrapped token, so the bridge’s contracts or verifiers hold the value while it is away.
Data sources: Bitcointalk (May 2, 2013), Bitcoin Wiki, Decred (September 20, 2017), BIP 199, THORChain documentation, IACR ePrint 2019/896 and Boltz on X (August 3, 2026), read November 16, 2026.