Atomic Swaps
Intermediateالمقايضات الذرية
Also known as: Atomic Swap, Atomic Cross-Chain Swap, Atomic Cross-Chain Trading
Last updated
Definition reviewed before publishing
Our content team writes and reviews every definition before it is published, and revisits it when the way a term is used in the markets changes. The date shows the latest change to this term.
Last updated on 25 November 2026
Atomic swaps are a technology that lets two parties exchange cryptocurrencies running on different blockchains directly, without a centralized exchange or trusted intermediary. They are called atomic because the trade either completes fully for both sides or is cancelled entirely, so neither party can take its share without the other.
Quick summary
• Direct exchange of two coins on different chains with no intermediary. • Built on hashed time-locked contracts. • Completes fully or is cancelled fully.
How it works
The technology relies on a hashed time-locked contract (HTLC). The first party chooses a secret and locks its coins in a contract on its own chain that can only be opened by whoever presents the secret before a set deadline, publishing only the hash of the secret. The second party then locks its coins in a similar contract on the other chain using the same hash, with a shorter deadline. When the first party claims the second party's coins, it has to reveal the secret on-chain, and the second party uses that secret to claim the first party's coins. If either side fails to complete its step before the deadline, the funds return automatically to their owners. This requires both chains to support the same hash function and time-lock features. Because no third party ever holds the coins, the main remaining risks come from user error and price moves during the waiting period.
Example
A user holds 1 bitcoin and wants to swap it for a coin on another chain at a hypothetical agreed rate of 40 units per bitcoin. The user locks the bitcoin for 48 hours, and the other party locks 40 units for 24 hours. If both steps complete, each side receives its share (1 for 40); if the other party walks away, the bitcoin returns to its owner after 48 hours.
Where you will see it
In some crypto wallets and decentralized exchanges that support cross-chain trading, in blockchain interoperability research, and in explanations of layer-two payment networks such as the Lightning Network.
Why it matters
This technology reduces reliance on centralized exchanges, which can be hacked, go bankrupt or freeze accounts, because each party keeps its keys until the moment of exchange. Adoption is still limited by thin liquidity and complex use, which explains why large exchanges remain dominant.
How it is calculated
There is no mathematical formula for atomic swaps, but the trade value is calculated as: amount received = amount sent × agreed swap rate.
How it differs from similar terms
• Decentralized exchange: usually trades on a single chain through liquidity pools, whereas an atomic swap links two different chains. • Cross-chain: a general concept for moving value between networks, which may rely on bridges that hold assets; an atomic swap needs no custodian. • Swap: a traditional financial exchange of cash flows or interest, while an atomic swap is an immediate exchange of digital assets.
Common mistakes
Believing atomic swaps work between any two cryptocurrencies or are completely risk free. In fact they need technical compatibility between the two chains, and user errors with deadlines or addresses, or price changes while waiting, can lead to missed opportunities or complications.