Market Cap: 24h Vol: BTC: BTC Dom:
Gold: S&P 500: EUR/USD: Oil (BRENT):

Atomic Swap

An atomic swap relies on a cryptographic construct called a Hashed Timelock Contract (HTLC) to make a cross-chain trade all-or-nothing: either both sides receive their coins, or the trade automatically unwinds and each party keeps their original funds.

The mechanism combines two conditions. A hashlock requires whoever claims the funds to reveal a secret value whose hash matches one published upfront; a timelock returns the coins to their original owner if nobody claims them before a deadline. One party locks coins on Chain A referencing the hash; the counterparty locks coins on Chain B referencing the same hash, but with a shorter deadline. When the first party claims the second lock, they must reveal the secret on-chain, which the counterparty then reuses to claim the first lock before its own deadline expires.

Because settlement depends only on matching cryptographic proofs rather than a custodian, atomic swaps remove the need for a Decentralized Exchange (DEX) order book or a centralized exchange account. Early implementations, including a 2017 Decred-Litecoin swap, proved the concept on Bitcoin-derived chains, and the Lightning Network still routes payments across channels using the same HTLC logic today.

Adoption remains limited: both blockchains must support compatible scripting, counterparties must be found manually, and either side can walk away if a trade looks unfavorable before completion, leaving the other briefly exposed. These constraints are one reason bridge-based Interoperability solutions have grown alongside, rather than instead of, native atomic swaps.

Atomic Swap Explainer Video

What is an Atomic Swap? | Crypto Terms Explained

Related Articles