Skip to definition

Transactions & network Advanced

Atomic Swap

In brief A peer-to-peer cross-chain trade enforced by hashed timelock contracts so neither party can steal funds.

Also referred to as: atomic swaps · cross-chain atomic swap · HTLC swap

Full explanation

A decentralized exchange protocol allowing two users on separate blockchains to swap coins directly without a custodian. Hash Time-Locked Contracts ensure both sides either reveal the shared secret before their timelocks expire or reclaim their original coins.

For exampleBob swaps LTC for Bitcoin using an HTLC whose timeout leaves enough time to claim on-chain before Alice's refund unlocks.

Common mistakeAssuming atomic swaps happen instantly or carry zero fee risk if timelocks are too tight during mempool spikes.

Put it into practice: Compare Litecoin vs Bitcoin & peer chains →

Primary sources: BIP 199: Hashed Time-Locked Contracts (HTLC) BIP 65: OP_CHECKLOCKTIMEVERIFY for timelocked refunds

Definition checked:

Quick answers about Atomic Swap

What does Atomic Swap mean in Litecoin?
A peer-to-peer cross-chain trade enforced by hashed timelock contracts so neither party can steal funds. A decentralized exchange protocol allowing two users on separate blockchains to swap coins directly without a custodian. Hash Time-Locked Contracts ensure both sides either reveal the shared secret before their timelocks expire or reclaim their original coins.
What is a common mistake with Atomic Swap?
Assuming atomic swaps happen instantly or carry zero fee risk if timelocks are too tight during mempool spikes.
How is Atomic Swap applied in practice?
Bob swaps LTC for Bitcoin using an HTLC whose timeout leaves enough time to claim on-chain before Alice's refund unlocks. You can explore this hands-on with our Compare Litecoin vs Bitcoin & peer chains.
Jarosław Wasiński
Editor-in-chief · Financial markets and Litecoin education

Editor-in-chief of Litecoin.watch and founder of MyBank.pl. His published work covers foreign exchange, financial education and Litecoin. On Litecoin.watch, his remit includes editorial direction, source transparency and the practical guides and research published by the site.

Background, selected work and editorial responsibility →

Founder of MyBank.pl Financial education and market analysis Named editorial responsibility