An atomic swap lets two people trade coins on different blockchains without handing either coin to a custodian. For someone who wants Bitcoin value on Ethereum as a token, RenBridge used a bridge model. In an atomic swap, each person locks coins under the same secret hash and a refund deadline. Claiming one side reveals the secret needed to claim the other; the deadlines let both people recover their coins if the trade stalls.
-
What goes in: Two traders, their agreed amounts of Bitcoin and Litecoin, and one secret hash.
-
What it takes: Both chains must support the same hash function and timelocks.
-
What comes out: Each trader claims the other’s coin, or the locked coins become refundable.
The locks are called hashed timelock contracts, or HTLCs. A hash lock requires a secret whose hash matches the one written into the contract. A time lock opens a refund path after a deadline. The same secret connects the two claims, while different deadlines give the second claimant time to act. Both traders must still watch the chains and submit their transactions in time.
A Bitcoin–Litecoin Swap Has Two Claims and Two Refund Paths
Take Alice, who wants Litecoin for her Bitcoin, and Bob, who wants her Bitcoin. They agree on the amounts before either coin moves.
-
Alice chooses a secret, keeps it private, and gives Bob its hash. She locks her BTC so Bob can claim it with the secret, or she can refund it after her deadline.
-
Bob checks Alice’s BTC lock. He then locks his LTC under the same hash so Alice can claim it, with a refund deadline earlier than Alice’s.
-
Alice checks Bob’s LTC lock and claims it by putting the secret in her Litecoin transaction. That transaction makes the secret visible on-chain.
-
Bob reads the revealed secret and uses it to claim Alice’s BTC before her later deadline.
The order of the deadlines matters. Alice may reveal the secret close to Bob’s LTC deadline, so her BTC lock must remain claimable long enough for Bob to see the Litecoin transaction and claim on Bitcoin. If Bob never locks LTC, Alice eventually refunds her BTC. If Alice never claims LTC, Bob refunds his LTC first and Alice refunds her BTC later. The hash links a successful pair of claims; the timelocks provide the exit when a claim never happens.
Alice’s Choice Can Leave Bob Waiting
Once Bob has locked his LTC, Alice alone can start the claims by revealing the secret. She can watch the BTC–LTC exchange rate during that window. If receiving the agreed LTC becomes attractive, she claims it and Bob can claim her BTC. If the rate moves against her, she can let Bob’s deadline pass. Bob then waits to recover his LTC instead of completing the trade.
That choice is a free option for the secret holder: Alice can decide whether to take the agreed rate after Bob has committed his coins, without paying him for the choice. Bob’s LTC cannot be used elsewhere while it is locked, and he may still pay transaction fees even when the swap fails. “Atomic” describes protection against one trader taking both coins when the protocol is followed; it does not promise that the trade will happen or that waiting costs are shared equally.
An Atomic Swap Trades Coins; RenBridge Moved Bitcoin Value
An atomic swap suits two people who want to exchange native coins, such as BTC for LTC, at an agreed rate. RenBridge served a different purpose: Darknodes in RenVM held deposited BTC and minted renBTC on Ethereum. The user received a Bitcoin representation on another chain, rather than another trader’s ETH or LTC. Confusing those outcomes can lead someone seeking native ETH to expect a bridge deposit to make a trade for them.
Related Questions
Can you atomic swap Bitcoin for ETH?
Yes, a BTC–ETH atomic swap is possible when the Bitcoin lock and Ethereum contract use a compatible hash function and timelocks, and both traders have suitable wallet or contract software. Alice’s claim of native ETH would reveal the secret Bob needs to claim native BTC. Swapping an Ethereum-based Bitcoin token for ETH on one Ethereum exchange is a different transaction: it never moves native BTC on the Bitcoin chain.
Why are atomic swaps rarely used today?
Every HTLC swap needs a willing counterparty, compatible locks on both chains, time for transactions to confirm, and enough room between deadlines to claim safely. Both sides pay chain fees, and a failed trade can leave coins locked until refunds become available. The secret holder’s option also makes a fixed quote costly for the other trader to offer. Those frictions make a direct atomic swap harder to arrange than an ordinary trade when speed or readily available liquidity matters.