Last Updated: November 4, 2026
A cross-chain atomic swap is a direct, peer-to-peer trade of two cryptocurrencies that live on different blockchains, such as bitcoin for litecoin, in which either both transfers happen or neither does. No exchange holds the coins: each side locks its funds in a hashed timelock contract (HTLC), and the same secret that lets one party claim its coins lets the other party claim theirs, while a time limit returns the funds if the trade is not finished.
Understanding cross-chain atomic swaps comes down to two locks. A hash lock ties both payments to one secret, so the trade settles together, and a time lock gives each party a guaranteed refund path, so nobody can be left with nothing. The idea was described on the Bitcointalk forum in 2013, the first public swaps between Decred, Litecoin and Bitcoin were announced in September 2017, and in 2026 the same building blocks power Lightning swap services, Bitcoin to Monero trading and peer-to-peer swap apps.
Key facts (November 4, 2026):
- What it is: a trustless trade between two blockchains with no custodian, no wrapped token and no counterparty risk beyond the time spent waiting.
- How it works: a hashed timelock contract on each chain, using the same secret hash; the person who starts the swap gets a longer refund deadline (typically 48 hours in Decred’s reference tool) than the person who joins it (typically 24 hours).
- What both chains need: support for the same hash function and for time locks. Chains without scripts, such as Monero, use a different method built on adaptor signatures.
- Where it is used in 2026: Lightning and Liquid swap services such as Boltz, Bitcoin to Monero swaps through eigenwallet (formerly UnstoppableSwap) and the Komodo DeFi Framework.
- Main trade-offs: slow settlement (several on-chain confirmations on two chains), a built-in “free option” for the party who reveals the secret, and thin liquidity compared with exchanges and bridges.
What Are Atomic Swaps?
An atomic swap, also called atomic cross-chain trading, lets two people exchange coins from different blockchains directly, without a centralized exchange, an escrow agent or a bridge. “Atomic” is a computing term for an operation that cannot be split: the swap either completes on both chains or is fully undone, so one party cannot receive coins while the other loses theirs.
The concept predates most of today’s DeFi. The Bitcoin Wiki credits a Bitcointalk post by the developer known as TierNolan with the protocol description most swaps still follow, a design that uses a secret number and refund transactions locked for 48 and 24 hours. In September 2017, Decred announced that its developers had built tools for direct swaps between DCR, BTC and LTC, and Litecoin creator Charlie Lee said Litecoin supported on-chain atomic swaps with Decred and Bitcoin.
The Mechanics Behind Atomic Swaps
Atomic swaps use smart contracts called hashed timelock contracts (HTLCs) to secure peer-to-peer trades. Bitcoin Optech describes an HTLC as a conditional payment with two clauses:
- Hash lock (payment clause): the receiver can claim the coins by revealing the preimage, a secret value whose cryptographic hash is written into the contract.
- Time lock (refund clause): if the coins are not claimed in time, the original owner can take them back after a set block height or time.
Both clauses also require the right signature, so only the intended receiver can use the secret and only the original owner can take the refund. On Bitcoin and Bitcoin-like chains, the time lock relies on script opcodes such as OP_CHECKLOCKTIMEVERIFY (BIP 65); on Ethereum and other smart contract chains, an HTLC is a small contract that holds the tokens and checks the hash and the deadline.
The trick that makes the swap atomic is that both contracts use the same hash. When the first party reveals the secret to claim coins on one chain, the secret becomes public on that chain, and the second party copies it to claim the coins on the other chain.
How a Cross-Chain Atomic Swap Works, Step by Step
The flow below follows Decred’s open-source atomicswap tool, which supports Bitcoin, Bitcoin Cash, Decred, Litecoin and several other coins:
- Agree on terms: the two parties agree on the coins, the amounts and their receiving addresses on each chain.
- Initiate: the initiator generates a secret, keeps it private, and locks its coins on chain A in an HTLC tied to the hash of that secret, with a refund deadline of typically 48 hours.
- Audit: the participant inspects the initiator’s contract on chain A to confirm the amount, the hash, its own address and the deadline.
- Participate: the participant locks its coins on chain B in a matching HTLC that uses the same hash, with a shorter refund deadline of typically 24 hours.
- Redeem on chain B: the initiator audits the second contract, then claims the coins on chain B by publishing the secret.
- Extract and redeem on chain A: the participant reads the secret from the initiator’s redeem transaction and uses it to claim the coins on chain A.
- Refund if anything fails: if the participant never locks its coins, or the initiator never redeems, each side reclaims its own funds after its deadline.
The participant’s deadline is shorter so the initiator cannot wait until the participant’s refund window has closed, reveal the secret late and keep both sets of coins. The initiator must redeem before the 24 hour lock ends, which still leaves the participant about a day to claim its side.
Example: Swapping Bitcoin for Litecoin
Alice holds BTC and wants LTC; Bob holds LTC and wants BTC. They agree that Alice will send 0.1 BTC for an agreed amount of LTC.
- Alice creates a secret, locks 0.1 BTC on the Bitcoin blockchain in an HTLC that pays Bob if he shows the secret, or refunds Alice after 48 hours.
- Bob checks Alice’s contract and locks his LTC on the Litecoin blockchain in an HTLC with the same hash that pays Alice if she shows the secret, or refunds Bob after 24 hours.
- Alice claims the LTC, and in doing so publishes the secret on the Litecoin blockchain.
- Bob takes the secret from Alice’s Litecoin transaction and claims the 0.1 BTC on Bitcoin.
If Bob never locks his LTC, Alice gets her bitcoin back after 48 hours. If Alice never claims, Bob gets his litecoin back after 24 hours and Alice gets her bitcoin back after 48. At no point can one of them walk away with both.
Atomic Swaps Without HTLCs: Bitcoin and Monero
Monero has no scripting language, so it cannot hold a hash lock. The Bitcoin to Monero protocol published by the COMIT team in October 2020 replaces the hash with adaptor signatures and split keys: the monero sits in an output that needs both parties’ keys, and the act of claiming the bitcoin leaks the key that unlocks the monero. Bitcoin is locked first, and the protocol adds cancel, refund and punish paths with their own time locks, so a party who stalls can be penalized. Bitcoin Optech notes that similar point timelocked contracts (PTLCs) could also give Bitcoin-only protocols better privacy and smaller transactions than HTLCs.
Advantages of Atomic Swaps
Atomic swaps offer several benefits for cryptocurrency traders and users:
Security and Trustlessness
Atomic swaps remove the need for trust between trading parties. The contracts, not a company or the other trader, enforce the deal, so the only outcomes are a completed trade or a refund. Neither party has to send first and hope the other follows, which removes the classic counterparty risk of over-the-counter trades.
Decentralization
Atomic swaps support the core principle of cryptocurrencies: decentralization. Coins stay in the users’ own wallets and in on-chain contracts the users control, so there is no exchange to hack, freeze accounts or fail. That risk is real: Binance was hacked on October 29, 2026, with about $6.3 billion taken, and the FBI attributed the theft to North Korea’s TraderTraitor on October 31; withdrawals were only partly reopened in the days that followed.
Cross-Chain Compatibility
Atomic swaps allow users to trade different cryptocurrencies, even when they run on separate blockchain technologies, as long as both chains support the same hash function and a time lock. Unlike a bridge, a swap delivers the native coin on each chain, so nobody ends up holding a wrapped token that depends on the bridge staying solvent.
Privacy
Atomic swaps take place directly between users and do not require an intermediary. There is usually no account to open and no identity check by a third party, and Bitcoin to Monero swaps let users move into a privacy coin without a centralized exchange. Standard HTLC swaps are not anonymous, though: the same hash appears on both chains, so a careful observer can link the two sides of the trade.
Atomic Swaps vs. Bridges vs. DEX Aggregators
Atomic swaps, bridges and cross-chain DEX aggregators all help users move value between blockchains, but they rely on very different kinds of trust. Blockchainreporter’s comparison below sums up the differences.
| Feature | Atomic swap | Bridge | Cross-chain DEX aggregator or intents app |
|---|---|---|---|
| What the user gets | The native coin on the other chain | Usually a wrapped or minted token, or native liquidity from the bridge | The token on the destination chain, routed through bridges, DEXs or solvers |
| Who holds funds during the trade | No one: each side’s own HTLC | The bridge’s contracts, validators or multisig | The protocols and solvers on the chosen route |
| Counterparty | One specific trader or market maker | The bridge operator or validator set | Solvers, bridges and DEXs picked by the router |
| Speed | Slow: confirmations on two chains, often 30 minutes or more | Minutes, depending on the design | Seconds to minutes |
| Liquidity | Thin, limited to available counterparties | Deep for major assets | Deep, aggregated across many sources |
| Main risk | Timeouts, free option, wallet mistakes | Bridge hacks and key theft | Smart contract bugs and route failures |
| Examples | Decred atomicswap, eigenwallet, Boltz chain swaps | Ronin, Wormhole, Nomad (all hacked in 2022) | NEAR Intents and similar intent networks |
Bridges are the biggest risk in this group. Chainalysis estimated in August 2022 that about $2 billion had been stolen in 13 cross-chain bridge hacks that year, 69% of all stolen crypto at the time, as reported by CoinDesk. The largest cases included Ronin (about $625 million, March 2022), Wormhole (about $325 million, February 2022) and Nomad (about $190 million, August 2022). Intent networks are newer but not immune: NEAR Intents paused its cross-chain services after a $3.8 million exploit on October 1, 2026.
THORChain is often called an atomic swap platform, but it works differently. Its documentation describes vaults controlled by its validator nodes through a threshold signature scheme (TSS), with swaps priced by continuous liquidity pools. Users get native coins, as with an atomic swap, but they trust the network’s vaults during the trade rather than a hash lock.
Where Are Atomic Swaps Used in 2026?
Atomic swaps never became a mass-market way to trade, but the HTLC idea runs underneath several tools people use today:
- Lightning Network swaps: the Lightning Network routes every payment through HTLCs. Boltz, which describes itself as a non-custodial Bitcoin bridge, offers submarine swaps (on-chain bitcoin to Lightning), reverse submarine swaps (Lightning to on-chain) and chain swaps between the Bitcoin mainchain and Liquid, all secured by a SHA256 preimage and refund paths after expiry.
- Bitcoin to Monero swaps: eigenwallet, a fork of the COMIT xmr-btc-swap project that was previously called UnstoppableSwap, describes itself as a Monero to Bitcoin decentralized exchange based on atomic swaps, with market makers running its “asb” software and takers using a desktop app.
- Multi-coin swap wallets: the Komodo DeFi Framework, whose former Komodo Platform domain now says it is part of the Gleec ecosystem, advertises peer-to-peer atomic swaps for building decentralized exchange apps.
- Command-line tools: Decred’s atomicswap repository still documents HTLC swaps between Bitcoin, Litecoin, Decred, Bitcoin Cash and other UTXO coins, mainly for developers and technical users.
For most users who simply want to move tokens between Ethereum, Solana and layer 2 networks, bridges, intents apps and centralized exchanges remain far more common because they are faster and have deeper liquidity. Atomic swaps are strongest where users want native bitcoin, self-custody throughout, or a route that avoids a custodian altogether.
Challenges and Future Prospects
Atomic swaps also face several challenges:
- Slow settlement: a swap needs confirmations on two blockchains plus waiting time between steps, so it is much slower than an exchange trade.
- The free option problem: the party who holds the secret can watch the market and simply let the swap expire if prices move against them. Researchers Runchao Han, Haoyu Lin and Jiangshan Yu showed in a 2019 paper that an atomic swap is equivalent to an American call option without a premium, and estimated that premium at about 2% to 3% of the asset value for cryptocurrencies.
- Funds locked during failures: if a counterparty disappears, coins stay locked until the time lock expires, which can be a day or two.
- Compatibility limits: both chains must support the same hash function and time locks. Chains without scripts need custom protocols such as adaptor signatures.
- Liquidity and usability: finding a counterparty for the exact pair and size is hard, and fees on two chains make small swaps expensive.
- User and software risk: users must keep their wallet online or return in time to claim or refund, and bugs in swap software can still cause losses.
Future prospects depend on better tooling rather than new theory. Schnorr signatures and adaptor signatures make PTLC-style swaps possible that are more private and cheaper than classic HTLCs, while market maker software, as used by eigenwallet and Boltz, solves part of the liquidity problem by giving users a ready counterparty. The trade-off between speed and trust remains: atomic swaps will stay slower than bridges and intent networks, but they remove the custodian that has been the source of the largest losses.
Frequently Asked Questions
What are atomic swaps?
Atomic swaps are direct trades of two cryptocurrencies on different blockchains, such as bitcoin for litecoin, carried out without a centralized exchange or custodian. Each party locks its coins in a contract on its own chain, and the trade is all or nothing: either both transfers complete, or both parties get their original coins back after a set time limit.
How do atomic swaps work?
One party creates a secret and locks coins in a hashed timelock contract tied to the secret’s hash. The other party locks coins on the second chain using the same hash. The first party claims the second party’s coins by revealing the secret, which lets the second party claim in turn. If anything stalls, time locks refund both sides automatically.
What is a hashed timelock contract (HTLC)?
A hashed timelock contract is a conditional payment with two exits. The receiver can claim the coins by revealing a secret whose hash is written in the contract, and the sender can take the coins back after a deadline if they were not claimed. Both exits also require the correct signature. HTLCs power atomic swaps and Lightning Network payments.
What are the advantages of atomic swaps?
Atomic swaps remove the need to trust the other trader or an exchange, because contracts enforce the deal and refund both sides if it fails. Coins never leave the users’ control, there is no exchange account to hack or freeze, and each side receives the native coin rather than a wrapped token. They can also reduce the personal data shared with third parties.
Are atomic swaps safe?
The protocol itself is well tested, since the same hash lock and time lock design has secured swaps since 2017. The practical risks are elsewhere: bugs in swap software, sending to a wrong address, or missing a claim or refund deadline. Users should use maintained open-source tools, verify the counterparty’s contract before funding, and keep their wallet online until the swap completes.
What is the difference between an atomic swap and a bridge?
An atomic swap trades native coins between two users, each using its own contract, so nobody else holds the funds. A bridge locks or burns tokens on one chain and releases or mints them on another, so users trust the bridge’s contracts and validators. Bridges are faster and more liquid, but bridge hacks have caused some of the largest losses in crypto history.
How long does an atomic swap take?
A typical on-chain atomic swap takes from about half an hour to a few hours, depending on the block times of both chains and how many confirmations each side waits for. A Bitcoin leg alone usually needs several ten-minute blocks. If the counterparty stops responding, funds can stay locked until the time lock expires, which is often 24 to 48 hours.
Which cryptocurrencies support atomic swaps?
Any two chains that support the same hash function and time locks can be swapped, which includes Bitcoin, Litecoin, Bitcoin Cash, Decred and most Bitcoin-based coins, plus Ethereum and other smart contract chains through HTLC contracts. Monero has no scripts, so Bitcoin to Monero swaps use a separate protocol based on adaptor signatures instead of a shared hash.
Can you do an atomic swap between Bitcoin and Monero?
Yes. Bitcoin to Monero atomic swaps have been possible since a protocol published by the COMIT team in 2020, and eigenwallet, formerly UnstoppableSwap, offers them through a desktop app and market makers. Because Monero cannot hold a hash lock, the protocol uses split keys and adaptor signatures, and claiming the bitcoin reveals the key that unlocks the monero.
What is the free option problem in atomic swaps?
The free option problem means the party holding the secret can decide late whether to finish the swap. If the price moves against them before they reveal the secret, they can let the swap expire and recover their coins. A 2019 academic study compared this to an American call option with no premium and estimated its value at about 2% to 3% for cryptocurrencies.
Wrap Up
Atomic swaps enable direct, trustless exchanges between different cryptocurrencies by combining two simple tools: a hash lock that ties both payments to one secret and a time lock that guarantees a refund. Since the first public swaps in 2017, the technology has moved from command-line experiments into Lightning swap services, Bitcoin to Monero trading and peer-to-peer swap wallets.
Atomic swaps are slower and less liquid than bridges, intent networks or exchanges, and they carry a built-in option for the party who reveals the secret. Their advantage is that no custodian or bridge holds user funds at any point, which matters more after the record bridge hacks of 2022 and the Binance hack of October 2026. Wider adoption depends on faster, more private swap designs and on market makers that make counterparties easy to find.
Data sources: Decred atomicswap repository and Decred announcement (September 20, 2017), Bitcoin Wiki, Bitcoin Optech, BIP 65, COMIT Network (October 2020), eigenwallet, Boltz documentation, THORChain documentation, Komodo DeFi Framework documentation, IACR ePrint 2019/896, CoinDesk (Chainalysis estimate, August 2022), The Block, all checked November 4, 2026.