Atomic Swap
A trustless exchange of assets across chains using time-locked contracts.
An atomic swap enables two parties to exchange assets across different blockchains without a centralized intermediary. Using Hash Time-Locked Contracts (HTLCs), both sides either complete or both refund—there's no partial completion, hence "atomic."
- Alice locks Coin A in an HTLC on Chain A with secret S and timeout T
- Bob locks Coin B in an HTLC on Chain B referencing the same hash(S) and timeout T/2
- Alice redeems Bob's HTLC by revealing S on Chain B
- Bob uses revealed S to redeem Alice's HTLC on Chain A
Atomic swaps require compatible scripting primitives and synchronized timeouts. Liquidity and UX challenges limit mainstream use compared to DEXs on a single chain.
Related Terms
Decentralized Exchange
→A decentralized exchange (DEX) is a platform that allows users to trade digital assets directly with each other, without the need for an intermediary, such as a brokerage or bank.
Simplified Payment Verification (SPV)
→A method that allows Bitcoin wallets to verify transactions with minimal data, reducing reliance on centralized servers.
Opcode
→A fundamental element of Bitcoin's scripting language that enables complex transactions.
All terms and definitions may update as the Cryptionary improves.