Home » Atomic swaps

Atomic swaps

« Back to Glossary Index

Atomic swaps are automatic exchanges of cryptocurrency between two parties on two different blockchains without having to go through a centralized intermediary. The biggest advantage here is that you are in complete control of your transactions and the entire system isn’t dependent on you trusting a third party.

So, how do they work? At its centre, the atomic swaps need a self-initiating smart contract to completely enforce the rules surrounding the transactions. Specifically, it utilizes a Hashed Timelock Contract (HTLC), which integrates predetermined timelocks and cryptographic hash functions.

So, if Alice wants to do an atomic swap with Bob, they will need to agree on a time constraint – say two hours. Within 2 hours, the two parties must finish all their interactions.

As such, an atomic swap uses two keys:

  • Hashlock: Ensures that trade is fulfilled only if both parties submit their cryptographic proofs.
  • Timelock: This key helps traders set the deadline for their atomic swaps.

The cross-chain trading mechanisms of atomic swaps help foster interoperability in the crypto ecosystem.

« Back to Glossary Index
Scroll to Top