·7 min de lecture
How Bitcoin Swaps Actually Work
Nick Campion
Head of Marketing

Four mechanisms, four different trade-offs between speed, trust and cost.
Key Takeaways
• Four mechanisms cover almost every Bitcoin swap in production today: custodial exchange swaps, atomic swaps (HTLCs), wrapped token bridges, and native cross-chain swap protocols.
• Custodial swaps are fastest because they're a database update, not a blockchain transaction, which is also why they carry full counterparty risk.
• Atomic swaps are cryptographically trustless but typically require up to six confirmations per chain, making them the slowest mainstream option.
• Wrapped tokens like WBTC can trade on fully decentralized exchanges while still depending entirely on a centralized custodian for the underlying BTC.
• Native cross-chain swap protocols, including intents-based RFQ models like BOB Gateway, settle in minutes with no wrapping and no single custodian holding funds.
A Bitcoin swap is the exchange of BTC for another asset, another cryptocurrency, a stablecoin, or value on a different layer of the Bitcoin network itself, without going through a traditional buy-then-sell sequence on an order book.
The phrase covers more ground than it might first appear to. Swapping Bitcoin for Ethereum on a centralized exchange, swapping BTC for ETH through a trustless cryptographic protocol, and swapping on-chain Bitcoin for Lightning Network Bitcoin are three genuinely different mechanisms, even though all three get called a swap in everyday conversation.
This guide explains what's actually happening at the technical level in each case, so the reader understands not just that a swap happened, but precisely how the assets changed hands and what guarantees, if any, protected them.
The Core Problem Bitcoin Swaps Solve
Each network is an isolated ledger with its own validation rules and no built-in way to read or trust data from another chain. This isolation is the fundamental challenge every Bitcoin swap mechanism is trying to solve: how to exchange value across systems that can't natively communicate, without requiring both parties to simply trust each other or a middleman.
There are essentially four answers to that question in production today, each a different trade-off between trust, speed, and cost:
- Custodial exchange swaps: A company holds both assets and updates an internal ledger.
- Atomic swaps (HTLCs): Cryptography enforces that both sides of the trade happen or neither does.
- Wrapped token bridges: A custodian locks real BTC and mints a synthetic representation elsewhere.
- Native cross-chain swap protocols: Decentralized validator or solver networks move real assets without wrapping or custody.
Mechanism 1: Custodial Exchange Swaps
This is the simplest mechanism conceptually, and what most people experience when they swap Bitcoin for another asset on a centralized platform.
When a user deposits BTC to a custodial exchange, it goes to an address the exchange controls. From that point, no blockchain transaction is required to execute the swap. The exchange's internal systems simply update a database. The actual Bitcoin deposited doesn't move as part of the swap itself; it sits in pooled custody, and the user's balance is a ledger entry, not a claim on a specific coin.
This is why custodial swaps are fast: no blockchain confirmation is required for the trade itself, only for the initial deposit and eventual withdrawal. It's also why custodial swaps carry counterparty risk no amount of cryptography can mitigate. The mechanism depends entirely on the operator behaving correctly, which is the failure mode behind the largest losses in Bitcoin's history. See Custodial vs. Non-Custodial Bitcoin Swaps for the historical record of what happens when that trust breaks down.
The step-by-step mechanics
Step 1: Secret generation. Alice generates a random secret and computes its cryptographic hash, sharing the hash (not the secret) with Bob.
Step 2: Alice locks her coins.
Step 3: Bob locks his coins. Bob creates a parallel contract on the other chain using the same hash, with the same claim-or-refund structure.
Step 4: Alice claims Bob's coins. To claim Bob's asset, Alice reveals her secret on-chain. The moment she does, it becomes permanently visible.
Step 5: Bob claims Alice's coins. Bob uses the now-visible secret to unlock Alice's contract and claim her Bitcoin.
If Bob never locks his side, Alice waits out the timeout and reclaims her own BTC; nothing is lost. There's no possible outcome where one party is left holding nothing while the other walks away with everything. Cryptography prevents it, not goodwill.
This is why atomic swaps tend to be slower and more expensive than a custodial trade, paying for and waiting on multiple independent confirmations rather than a single database update.
Where atomic swaps are actually used today
For Bitcoin-to-Monero swaps specifically, the COMIT team's xmr-btc-swap tool is the standard implementation.
Mechanism 3: Wrapped Bitcoin, Bridging Through a Custodian
Wrapped Bitcoin solves a different problem: how to use BTC's economic value inside ecosystems that don't run Bitcoin's own scripting language, most commonly Ethereum.
The mechanism is fundamentally custodial, even though the resulting token trades freely on decentralized exchanges. A user sends real BTC to a custodian, historically and primarily BitGo for WBTC, who holds it in reserve and authorizes minting an equivalent ERC-20 token on Ethereum. To convert back, the holder burns the wrapped token and the custodian releases the corresponding BTC.
For the full history of what happens when that custody arrangement fails, including the FTX-linked soBTC depeg, see What Is a Native Bitcoin Swap and Custodial vs. Non-Custodial Bitcoin Swaps.
This is worth being precise about: the trading layer for a wrapped token can be fully decentralized. Swapping WBTC on a DEX involves no custodian in that specific transaction, while the underlying asset itself still depends on a custodian upstream. Decentralized trading and non-custodial backing are two separate properties, and a wrapped token typically has only one.
Mechanism 4: Native Cross-Chain Swaps, No Wrapping, No Custody
A newer category of protocols avoids the trade-offs of both atomic swaps (slow, requires a matching counterparty) and wrapped tokens (fast, but custodial). These let users swap native, unwrapped assets across chains through decentralized networks of validators or solvers rather than a single custodian or a direct one-to-one cryptographic handshake.
The protocol checks available liquidity across pools, calculates the resulting exchange rate, and estimates network fees on both chains, all in milliseconds before any funds move, typically through threshold signature schemes distributing signing authority across many independent parties. Some implementations use thresholds as high as 100-of-150 to eliminate single points of failure.
BOB Gateway implements a variant of this model specifically for Bitcoin: rather than a validator-vault network, it uses an intents-based RFQ system where solvers compete to fill each swap, settled trustlessly rather than a custodian's attestation. The practical result is the same as the broader category: a user sends Bitcoin, the protocol handles the cross-chain logic and the user receives a native asset directly, with no synthetic token, no minting and no intermediary token created in between. It requires the validator or solver set to behave honestly and the underlying cryptography to be bug-free, but it is a meaningfully more distributed trust model than handing custody to a single company, and it avoids wrapped-token peg risk entirely since no synthetic asset is created.
For the full fee and settlement breakdown, see BTC to USDT Swap Fees Compared: BOB Gateway, THORChain and Near Intents.
| Mechanism | Speed | Custody Model | Counterparty Risk |
|---|---|---|---|
| Custodial exchange swap | Fastest, instant ledger update | Full custody by exchange | High |
| Atomic swap (HTLC) | Slow, multiple confirmations, often minutes | None, cryptographically enforced | Minimal |
| Wrapped Bitcoin (WBTC) | Fast once minted; minting/redemption slower | Custodial | Moderate to high |
| Native cross-chain swap (incl. BOB Gateway) | Fast, 10 min on average | Distributed / trust-minimized, no single custodian | Low |
What Each Mechanism Actually Costs
Speed and trust get most of the attention in this comparison, but cost is the variable that determines which mechanism makes sense for a given transaction size.
- Custodial exchange swaps. The exchange's fee structure is the only cost, typically a percentage of the trade plus a withdrawal fee when the asset eventually leaves the platform. No on-chain settlement fee applies to the swap itself.
- Atomic swaps (HTLCs). Each on-chain leg, lock, claim, and any refund pays its own network fee. On Bitcoin, four to six transactions at typical fee rates can add up to a meaningful cost on small trades, which is part of why atomic swaps work better for larger amounts where the percentage cost shrinks.
- Wrapped Bitcoin. Minting and redemption each cost gas on the destination chain, separate from any custodian fee for the wrapping service itself. Trading the wrapped token afterward costs whatever the DEX or AMM charges, similar to trading any other token.
- Native cross-chain swaps. Costs here come from network fees on both chains plus whatever spread or fee the liquidity provider or solver charges to fill the swap. Because providers compete for each order, this spread tends to be the smallest of all five mechanisms on liquid pairs. For. eg BOB Gateway charges zero protocol fees, making it the most cost-effective way to swap cross-chain BTC swaps.
What Actually Determines Which Mechanism You're Using
- Does a new token get created? If a deposit returns a token named “wrapped,” “synthetic,” or a non-native ticker (WBTC, renBTC), the wrapped-token model is in play, and a custodian is involved somewhere even if the trading interface is decentralized.
- Does the platform's database update instantly or wait for confirmations? Near-instant settlement without confirmation delays generally indicates a custodial ledger update. Genuine cross-chain settlement, atomic or native, requires waiting on real blockchain confirmation times, even if compressed to minutes through engineering.
- Who could theoretically prevent fund recovery if something went wrong? If the answer is the company running the platform, it's a custodial model. If the answer is nothing, the cryptography refunds automatically after a timeout, it's an atomic or submarine swap. If the answer is a supermajority of an independent validator or solver set would need to collude, it's a native cross-chain swap.
Swaps are the mechanics. See BTCFi in 2026 for the broader picture of where productive Bitcoin is headed.
See how BOB Gateway applies the native cross-chain model at app.gobob.xyz
Frequently asked questions

Nick Campion
Head of Marketing
20+ years building global brands across Web2 and Web3. Prev. Head of Marketing at Flare Network; Director of Brand & Communications at F45 Training; Wieden+Kennedy.