Atomic Swap

A peer-to-peer exchange of cryptocurrencies across different blockchains without requiring a trusted third party or centralized exchange.

Detailed Explanation

Atomic swaps use hash time-locked contracts (HTLCs) to ensure that either both parties receive their coins or neither does, making the swap "atomic" (indivisible). The process involves both parties creating time-locked transactions on their respective blockchains, linked by a shared cryptographic secret. When one party reveals the secret to claim their coins, the other party can use the same secret to claim theirs.

Why It Matters

Atomic swaps represent the ideal of trustless, decentralized trading. They remove the need for a centralized exchange, so no one holds your funds during the trade. Network fees still apply. Atomic swaps remain technically complex for everyday use.

Key Considerations

Atomic swaps require both blockchains to support compatible hashing algorithms and time-locked transactions. The technology works best between chains using similar cryptographic primitives. While promising for trustless trading, atomic swaps currently have limited practical adoption due to complexity, liquidity challenges, and the rise of cross-chain bridges offering simpler alternatives.

Example

Alice wants to trade Bitcoin for Bob's Litecoin. Alice creates a secret and locks her Bitcoin to its hash. Bob locks his Litecoin to the same hash. When Alice reveals the secret to claim the Litecoin, Bob can use it to claim the Bitcoin. If either side stalls, the time lock expires and both get their coins back.

Related Terms

Frequently Asked Questions

What is Atomic Swap?

A peer-to-peer exchange of cryptocurrencies across different blockchains without requiring a trusted third party or centralized exchange.

Why is Atomic Swap important in crypto?

Atomic swaps represent the ideal of trustless, decentralized trading.

Are atomic swaps widely used today?
Not by everyday users. Most cross-chain trading happens through centralized exchanges or bridges. Some cross-chain DEXs, such as THORChain, use pooled liquidity instead of classic hash time-locked swaps.