Infrastructure

Atomic Swap

A trustless exchange of two different coins across chains that either completes fully for both sides or not at all.

The classic version uses a hashed timelock contract. One party locks coins behind a secret hash; the other matches it on their chain. Revealing the secret to claim one side automatically exposes it to claim the other. If either party stalls, a timeout refunds both. No exchange or custodian ever holds the funds.

Swaps work best between chains with compatible scripting, like Bitcoin and Litecoin. They never caught on for everyday trading. They are slow, and both assets must support the same locking primitive, which rules out most pairs.

Related terms