How Atomic Swaps Work

Atomic swaps enable trustless exchange of cryptocurrencies between two parties without requiring a trusted third party or escrow service.

Step 1: Create or Browse Offers

Sellers create offers specifying BTC amount and discount/premium. Buyers browse the marketplace for suitable offers.

Step 2: Accept & Sign Terms

When a buyer accepts an offer, both parties digitally sign the swap terms, creating a binding agreement.

Step 3: Seller Locks BTC

The seller locks their BTC in a Hash Time-Locked Contract (HTLC) with a secret hash. This BTC is now cryptographically committed.

Step 4: Buyer Locks USDT

After verifying the BTC lock, the buyer locks their USDT in a corresponding HTLC using the same secret hash.

Step 5: Seller Redeems USDT

The seller reveals the secret to claim the USDT. This revelation exposes the secret on-chain.

Step 6: Buyer Redeems BTC

Using the revealed secret, the buyer can now claim the locked BTC. Swap complete!

Key Concepts

Hash Time-Locked Contracts

HTLCs are smart contracts that lock funds until a cryptographic condition (revealing a secret) is met, with a time-based refund mechanism.

Timelocks

Each HTLC has an expiration time. If the swap isn't completed, funds automatically become refundable to the original owner.

Atomicity

"Atomic" means the swap either completes fully for both parties, or doesn't happen at all. No partial execution is possible.

Refund Safety

If either party fails to complete their part, the timelock ensures both can recover their original funds after expiration.

← Back to Home