Glossary

Atomic Swap

An atomic swap is a trade that exchanges one cryptocurrency for another across different blockchains directly between two parties, with the transfers completing fully or not at all, without a trusted intermediary.

What Is an Atomic Swap?

An atomic swap is a way of exchanging one cryptocurrency for another directly between two parties, often across different blockchain networks, without depositing funds with a centralized exchange or other trusted intermediary. The word "atomic" refers to the all-or-nothing nature of the trade. Either both transfers complete, or neither does, so one party cannot receive the other's asset while keeping their own.

How It Works

Most atomic swaps are built on hash time-locked contract (HTLC) scripts. The first party creates a secret random value and shares only its cryptographic hash with the counterparty. Each side then locks its coins in a contract on its own blockchain. The coins can be unlocked in one of two ways: by revealing the secret before a deadline, or by returning the coins to the original owner once the deadline passes.

When the first party claims the counterparty's coins by revealing the secret, that secret becomes visible on the second chain. The counterparty can then use the same secret to claim the first party's coins. If one side never completes its part, the deadlines allow both sides to recover their original funds.

Advantages and Disadvantages

  • Users keep custody of their own funds during the trade rather than handing them to a third party.
  • Trades can be made between chains that do not natively interact with each other.
  • Both blockchains must support compatible contract features, which many do not.
  • Finding a counterparty with matching terms can be difficult, so liquidity is often thin.
  • Swaps can be slow, since each side must wait for confirmations and deadlines, and users may need to manage refunds if a trade stalls.
  • The setup is more technical than a typical exchange order, and slippage or fees can still affect the final amount received.

Why It Matters to Investors

Atomic swaps reduce some risks tied to centralized platforms, such as exchange hacks or withdrawal freezes, but they do not remove all risks. Trades remain exposed to price movements during the swap window, to software bugs, and to mistakes in handling keys and deadlines. Understanding how the mechanism works helps investors evaluate claims about "trustless" trading, which depend on the specific implementation.

Updated October 15, 2026. For general education only; not financial, tax or legal advice.

Browse the Glossary

Related Terms