What Is an Atomic Swap in Crypto
Publicado: 21 de agosto de 2026Mundo cripto
Este artigo ainda não foi traduzido para o seu idioma — você está a ler o original em English.
An atomic swap trades coins on two different blockchains directly between two people, with nobody holding the money in between. Either both halves of the trade happen or neither does — that is what the word atomic means here. It is a real mechanism, not a marketing term, and it comes with real limits. Here is how it works, what it leaves visible on the chain, and why Bitcoin to Monero is both the case where it matters most and the hardest one to build.
How an atomic swap actually works
Say one person has Bitcoin and wants Litecoin, and someone else wants the opposite trade. The naive version requires one of them to send first and hope. The swap replaces that hope with a puzzle.
The first party invents a secret number and publishes only its hash — a fingerprint that reveals nothing about the number itself. Both sides then lock their coins in contracts with the same two conditions: the coins go to the other party if they present the secret, and they come back to the owner if a timer runs out first.
Now the trap closes. The first party claims the other side's coins, which forces them to reveal the secret to do it. The moment they do, that secret is public on the chain — and the second party copies it and uses it to claim their side. One action unlocks both halves. If either side walks away, both timers expire and both refunds go home.
One detail carries the whole design: the second lock must expire before the first. Get that order wrong and you create a window where one party can claim and the other can no longer refund. This construction is called a hashed timelock contract, or HTLC, and the first live cross-chain swap using it ran between Decred and Litecoin in September 2017. Decred still publishes the reference implementation and its documentation.
What it is actually for
Not speed. Not price. The single thing an atomic swap buys you is custody.
On an exchange, you deposit, and for as long as the coins sit there they are the exchange's problem and the exchange's risk. With an instant exchanger the window is shorter — minutes rather than months — but it exists: you send first, and the service sends back. An atomic swap removes that window completely. There is no moment when a third party could run off with the funds, because there is no third party in the transaction at all.
That is worth stating precisely, because the word "trustless" gets stretched. A swap removes counterparty risk. It does not remove software bugs, thin liquidity, a badly generated key, or your own mistake in copying an address. Those are still yours.
Are atomic swaps traceable?
This is the question people actually type into search, and the honest answer splits in two — because there are two generations of the technology.
Classic HTLC swaps are quite visible. The contract sits on the chain in the open, and the same hash appears on both sides of the trade. When the secret gets revealed to claim the coins, anyone watching can take it, hash it, and search the other chain for the contract that matches. That match is a permanent, public link between the two legs of your swap. Blockchain analysis firms treat this as a known technique, not an exotic one.
Scriptless swaps hide much more. The newer design moves the lock out of the contract script and into the signature itself, using what are called adaptor signatures. Nothing unusual is written to the chain, so a completed swap looks like an ordinary payment. There is no special script to spot and no shared hash to match.
And one thing stays true in both cases: on a transparent chain, amounts, addresses and timing remain public regardless. An atomic swap removes the intermediary; it does not remove the ledger. Treating it as a privacy tool on its own is the mistake to avoid — if the coins land back on Bitcoin, they are as visible as any other Bitcoin.
Bitcoin to Monero: the case that matters, and the hard one
Monero is the pair most people asking about atomic swaps actually want, and it is the pair that nearly did not happen.
The problem is that Monero has no scripting language. There is simply nowhere to put a hashed timelock contract — the classic construction cannot be expressed on that chain at all. The way around it was to stop using scripts and lean on adaptor signatures instead, so that the lock lives inside the signature on the Bitcoin side and Monero only ever sees a normal transaction. The protocol was worked out by the researcher known as h4sh3d, and the Monero project announced working Bitcoin–Monero swaps in August 2021.
There is a pleasant side effect. Because the design had to abandon scripts to accommodate Monero, the Bitcoin leg stopped looking like a swap — this pair is more private on-chain than an old-style HTLC swap between two transparent coins.
Two tools carry this today. UnstoppableSwap is a desktop application built on the COMIT protocol that walks you through one swap at a time against a chosen liquidity provider. BasicSwap takes the order-book approach, run by the Particl community, and covers Monero alongside a dozen other coins with no protocol fee. Both are open source, and with both you should verify the release signature before running anything.
Expect the process to take a while. Bitcoin confirmations set the pace, so twenty minutes to an hour is normal, and individual counterparties cap what they are willing to trade — often somewhere between a thousandth of a bitcoin and a couple of them.
Why almost nobody uses them
The mechanism has been working for years. Adoption is still small, and the reasons are practical rather than philosophical.
- Both sides must be online. A swap is a conversation between two live participants, not an order you leave resting.
- Someone has to want the opposite trade. In the same pair, at roughly the same size, at the same moment. Order books for swaps are thin, and that is the binding constraint.
- The coin list is short. Bitcoin, Litecoin, Monero and a handful of others. Most assets simply have no swap route.
- It is slow by design. Confirmations on two chains, plus the back-and-forth between wallets.
- Interruptions cost time. If the other side stops responding, your money is not lost, but it is locked until the timer expires.
None of that makes the technology bad. It makes it a specialist tool for a narrow case — the case where custody genuinely matters more than convenience.
Swap, DEX or exchanger: picking by what you need
Three questions separate them cleanly.
Who holds the money? In an atomic swap, nobody — that is the entire point. On a decentralised exchange, a contract holds it briefly. With an instant exchanger, the service handles the route, and how long anything rests anywhere depends on the service.
Which pairs can you actually get? A swap gives you the fewest. A DEX covers what lives on its own chain or has been bridged onto it. An exchanger covers the most, and is usually the only practical answer when one leg is Monero.
What does the chain show? A scriptless swap shows little. An HTLC swap shows the link between both legs. A DEX shows everything. An exchanger depends on which chains you are moving between.
We are not an atomic swap, and it would be dishonest to imply otherwise. Our exchange runs over the NEAR Intents protocol, and Monero legs are executed through partner exchange services — a different design with different trade-offs: far more pairs and no need to find a counterparty, in return for a route that passes through infrastructure rather than a direct two-party contract. You can see what that covers on our rates page, and the pair this article is about has a page of its own with the live rate and limits: bitcoin to Monero. The practical side of getting Monero is in how to buy Monero anonymously.
In short
An atomic swap is a two-chain trade held together by a shared secret and two timers: both halves complete, or neither does. It removes the intermediary, which is a real and narrow benefit. It does not make you invisible — old-style swaps leave a public link between both legs, and even the newer scriptless ones cannot hide what a transparent chain records. Bitcoin to Monero is the pair worth knowing about, it works, and it asks for patience, a counterparty and a tolerance for small sizes.
