Bitcoin Privacy

Whirlpool CoinJoin: Step-by-Step Tutorial

Abstract visualization of Bitcoin CoinJoin mixing process with converging golden streams
Reading Time: 10 minutes

What Is Whirlpool CoinJoin?

Whirlpool is a CoinJoin implementation originally developed by the Samourai Wallet team and now integrated into Sparrow Wallet. It breaks the transaction history of your bitcoin by mixing your UTXOs with other users’ UTXOs in a structured, trustless process. After a Whirlpool mix, the on-chain link between the source of your funds and the mixed output is mathematically broken — a blockchain analyst cannot determine which input maps to which output.

Unlike centralized mixing services that take custody of your bitcoin, Whirlpool uses a coordinator that blindly facilitates the mix without ever controlling your funds. The coordinator cannot steal your bitcoin, cannot link your inputs to your outputs, and cannot censor specific users. Every mix is a standard Bitcoin transaction with equal-value outputs, enforced by Bitcoin’s consensus rules.

Why CoinJoin Matters

Bitcoin transactions are permanently public. Every time you buy bitcoin on a KYC exchange and withdraw to your wallet, that address is linked to your identity. When you spend from that address, the recipient can trace the funds backward to the exchange and infer your purchase history. Chain analysis companies like Chainalysis exploit these links to build financial profiles of Bitcoin users.

CoinJoin disrupts this surveillance by creating ambiguity. After mixing, your bitcoin’s on-chain history points to multiple possible origins instead of one definitive source. This is not about hiding illegal activity — it is about restoring the basic financial privacy that traditional banking provides by default but Bitcoin’s transparent ledger does not. The chain analysis guide explains how tracking works in detail.

How Whirlpool Works

The Mix Structure

A Whirlpool mix is a multi-party transaction where 5 participants each contribute one UTXO of equal value and receive one UTXO of equal value. The transaction has 5 inputs and 5 outputs, all of exactly the same denomination. An outside observer sees 5 equally sized inputs and 5 equally sized outputs with no way to determine the mapping.

The forward-looking anonymity set (anonset) starts at 5 after one mix. Each subsequent remix increases the anonymity set because your UTXO gets mixed with other already-mixed UTXOs. After 3–5 remixes, the practical anonset can reach dozens or hundreds of possible origins.

Pool Sizes

Whirlpool offers multiple pool denominations to accommodate different UTXO sizes:

Pool Denomination Best For
0.5 BTC 50,000,000 sats Large UTXOs from significant purchases
0.05 BTC 5,000,000 sats Medium holdings
0.01 BTC 1,000,000 sats Smaller amounts, more accessible
0.001 BTC 100,000 sats Micro amounts, highest accessibility

You pay a one-time pool entry fee (the coordinator fee) when your UTXO enters a pool. After that, you can remix an unlimited number of times for free. This economic structure incentivizes leaving your UTXOs in the mix pool for extended periods, which benefits all participants by increasing the available anonymity set.

TX0: The Pre-Mix Transaction

Before entering a Whirlpool pool, your UTXO goes through a TX0 — a preparation transaction that splits your funds into pool-sized chunks. For example, if you send 0.15 BTC to Whirlpool and choose the 0.05 BTC pool, the TX0 creates:

  • 3 outputs of 0.05 BTC each (ready for mixing)
  • 1 output for the coordinator fee
  • 1 change output (any leftover amount that does not fit the pool denomination)

The TX0 change output is called toxic change because it is directly linked to your pre-mix identity. Managing this toxic change properly is critical — we cover this in the post-mix UTXO management section below.

Using Whirlpool With Sparrow Wallet

Since the Samourai Wallet servers were taken down in 2024, Sparrow Wallet has become the primary desktop interface for Whirlpool. Sparrow connects to independent Whirlpool coordinators that have been spun up by the community.

Step 1: Set Up Sparrow

  1. Download and verify Sparrow Wallet from sparrowwallet.com.
  2. Connect Sparrow to your own Bitcoin node or a public Electrum server. Using your own node prevents address leakage to third parties.
  3. Create a new wallet or open an existing one containing the bitcoin you want to mix.

Step 2: Configure Whirlpool

  1. In Sparrow, go to Tools → Mix To or access the mixing tab from your wallet.
  2. Sparrow displays available Whirlpool coordinators. Select one that is online and has active participants.
  3. Enter the SCODE if you have one (discount codes that reduce or eliminate the coordinator fee).

Step 3: Initiate the TX0

  1. Select the UTXO(s) you want to mix from your wallet’s UTXOs tab.
  2. Right-click and select Mix Selected (or use the Mix To interface).
  3. Choose the pool denomination. Sparrow shows you the breakdown: how many pool-sized outputs will be created, the coordinator fee, the miner fee, and the toxic change amount.
  4. Review and confirm. The TX0 broadcasts to the network.

Step 4: Wait for Mixes

After the TX0 confirms, your pool-sized UTXOs enter the pre-mix queue. Mixes happen automatically when enough participants are available. Each mix takes one on-chain transaction confirmation. Your UTXOs move from the “Premix” account to the “Postmix” account after their first mix.

Sparrow must remain open and connected for mixing to continue. If you close Sparrow, your UTXOs stay in the pool but stop mixing. When you reopen, mixing resumes automatically. For continuous mixing, consider running Sparrow on a dedicated machine or within a node environment.

Step 5: Remix

Once in postmix, your UTXOs automatically re-enter the mixing pool as free riders (no additional coordinator fee). Each remix increases your anonymity set. Let your UTXOs remix for several rounds — there is no fee cost and each mix strengthens privacy.

Remix Strategy

The number of remixes directly affects your forward-looking privacy. Here is a practical framework:

  • Minimum: 2–3 mixes — Sufficient for basic privacy, breaks the direct link from your TX0 inputs.
  • Recommended: 5–10 mixes — Provides a strong anonymity set. Most chain analysis heuristics fail at this level.
  • Paranoid: 20+ mixes — Maximum privacy. Useful if you are mixing coins from a KYC exchange and want to thoroughly break any link.

The marginal privacy gain decreases with each mix, but since remixes are free, there is no reason to stop early. Leave Sparrow running and let your UTXOs mix until you need to spend them.

UTXO Management After Mixing

Mixing is only half the battle. How you handle your post-mix UTXOs determines whether you preserve or destroy the privacy gained. This is where most users make mistakes.

Rule 1: Never Merge Post-Mix UTXOs

If you combine two post-mix UTXOs in a single transaction, a blockchain analyst can infer they belong to the same owner. This is called a common input ownership heuristic and it partially undoes the mixing. Spend post-mix UTXOs individually whenever possible.

Rule 2: Never Merge Post-Mix With Unmixed UTXOs

Combining a mixed UTXO with a KYC-linked unmixed UTXO instantly re-links your mixed funds to your identity. This is the most common and most damaging mistake. Keep mixed and unmixed wallets completely separate.

Rule 3: Handle Toxic Change Carefully

The toxic change from your TX0 is directly linked to your pre-mix identity. Options for handling it:

  • Mix it separately — If it is large enough to enter another pool, mix it in the smallest pool denomination available.
  • Spend it on something non-sensitive — Use it for a purchase where identity linkage does not matter.
  • Consolidate with other KYC UTXOs only — Since it is already linked, merging it with other KYC coins does not make things worse (but do not merge with post-mix coins).

For a comprehensive treatment of UTXO management strategies, the UTXO privacy management guide covers best practices in depth.

Rule 4: Use Coin Control for Every Spend

Sparrow’s coin control feature lets you select exactly which UTXO(s) to spend in each transaction. Always use coin control when spending from your post-mix wallet. Never rely on automatic coin selection — it may merge UTXOs in ways that damage privacy.

Rule 5: Consider Post-Mix Spending Tools

Sparrow supports several post-mix spending strategies:

  • Stonewall — A transaction that creates extra outputs to confuse analysis, mimicking a CoinJoin even when you are the only participant.
  • StonewallX2 — A collaborative transaction with another Sparrow user that creates real ambiguity about which party controls which outputs.

These tools add an additional layer of plausible deniability on top of the anonymity gained from Whirlpool mixing.

Costs and Economics

Coordinator Fees

Each pool charges a one-time fee for the TX0:

Pool Coordinator Fee
0.5 BTC ~175,000 sats (3.5%)
0.05 BTC ~17,500 sats (3.5%)
0.01 BTC ~5,000 sats (5%)
0.001 BTC ~700 sats (7%)

The percentage is higher for smaller pools, but the absolute cost is lower. After the initial fee, all remixes are free. This means mixing more bitcoin per TX0 amortizes the cost: entering 3 × 0.05 BTC outputs in a single TX0 pays the coordinator fee once, not three times.

Miner Fees

Each mix is an on-chain transaction, so you pay mining fees for the TX0 and each subsequent mix. During high-fee periods, it may be cost-effective to wait for lower fee rates before initiating TX0. Remixes are usually economical because Whirlpool batches them efficiently.

Privacy Considerations

Network-Level Privacy

On-chain mixing addresses transaction graph analysis but does not protect against network-level surveillance. If your Bitcoin node’s IP address is monitored, an observer can correlate transactions with your identity. Run Sparrow over Tor or connect to a node that routes over Tor to prevent this.

Coordinator Trust Model

The Whirlpool coordinator uses blind signatures (a cryptographic technique where the coordinator signs something without seeing its content) to prevent linking your input to your output. The coordinator knows that you are participating in a mix, but it cannot determine which output is yours. This is a significant privacy guarantee, but it does mean the coordinator knows your IP address (mitigated by using Tor) and knows you are mixing.

Post-Samourai Landscape

Following the Samourai Wallet enforcement action in April 2024, the original Whirlpool coordinator was taken offline. Community-run coordinators have emerged as replacements. The underlying Whirlpool protocol remains functional — only the coordinator infrastructure changed. Sparrow Wallet continues to support Whirlpool mixing through these community coordinators.

Practical Workflow Example

Here is a concrete scenario showing the full Whirlpool workflow from start to finish:

  1. Starting position: You have 0.12 BTC in a Sparrow wallet, received from a KYC exchange. The exchange knows your identity and can see this UTXO on the blockchain.
  2. Choose the 0.01 BTC pool. Your 0.12 BTC will produce approximately 11 outputs of 0.01 BTC each, plus coordinator fees and toxic change.
  3. Initiate TX0. Sparrow splits your UTXO into pool-sized pieces. The TX0 costs the coordinator fee (approximately 5,000 sats) plus miner fees. You now have 11 pre-mix UTXOs and a small toxic change output.
  4. Wait for mixes. Over the next hours to days (depending on pool activity), each of your 11 UTXOs gets its initial mix. They move from “Premix” to “Postmix” in Sparrow.
  5. Let them remix. Leave Sparrow open for several days. Each UTXO remixes multiple times at no cost, steadily increasing your anonymity set.
  6. Spend when ready. When you need to make a payment, go to the Postmix wallet, use coin control to select a single UTXO, and send it. The recipient has no way to trace this UTXO back to your KYC purchase on the exchange.
  7. Handle toxic change. The leftover change from your TX0 is still linked to your identity. Keep it in a separate wallet, mix it in a smaller pool if it is large enough, or spend it on something where identity linkage is acceptable.

The key discipline throughout this process is separation: never let your post-mix UTXOs touch your pre-mix or unmixed coins. Treat them as entirely separate financial pools, managed in separate wallets within Sparrow.

Alternatives to Whirlpool

Whirlpool is not the only privacy tool available to Bitcoin users:

  • JoinMarket — A decentralized CoinJoin marketplace where makers offer liquidity and takers pay fees. More technically complex but fully decentralized with no coordinator dependency.
  • PayJoin — A two-party CoinJoin disguised as a regular payment. Breaks the common input ownership heuristic but only works for actual payments between two cooperating parties.
  • Silent Payments — A different approach that provides receiver privacy through address non-reuse without requiring CoinJoin. Complementary to rather than a replacement for Whirlpool.

The advanced privacy strategies guide compares these approaches and when to use each.

Common Mistakes and How to Avoid Them

Even experienced users make errors that partially or fully undo the privacy benefits of CoinJoin. The most common mistakes and their mitigations:

  • Sending post-mix UTXOs back to a KYC exchange address. This re-links the mixed coins to your identity. If you need to sell, use a different exchange or peer-to-peer method that does not require identity verification.
  • Consolidating small post-mix UTXOs. If you have many small post-mix outputs and want to combine them for a larger payment, do so carefully. Each consolidation partially degrades privacy. When possible, use multiple separate transactions instead of one consolidated spend.
  • Not using Tor. Without Tor, your home IP address is visible to the coordinator and to your Bitcoin node’s peers. This network-level metadata can be correlated with transaction timing. Always connect Sparrow through Tor when mixing.
  • Mixing and immediately spending. If you mix a UTXO and spend it within the same block or a few blocks later, timing analysis can narrow down which post-mix output is yours. Let your UTXOs sit in the post-mix pool for at least a few days, ideally longer, with multiple remixes before spending.
Part of our free Bitcoin course: This topic is covered in depth in
CoinJoin Explained from the
Advanced Bitcoin Security & Privacy course.

Frequently Asked Questions

Is CoinJoin legal?

CoinJoin is a standard Bitcoin transaction. There is no law in most jurisdictions that prohibits constructing transactions with specific structures. The legal risk relates to operating a centralized mixing service (as seen with the Samourai case), not to participating in CoinJoin as a user. However, regulations vary by jurisdiction, and some exchanges may flag coins with CoinJoin history. Consult local legal guidance for your specific situation.

Will exchanges reject my mixed bitcoin?

Some exchanges use chain analysis tools that flag CoinJoin transactions. Coinbase, for example, has reportedly frozen accounts with Whirlpool-associated UTXOs. If you plan to sell mixed bitcoin on a KYC exchange, be aware of this risk. Alternatives include peer-to-peer sales or using exchanges with more privacy-friendly policies.

How long should I leave my bitcoin in the mix pool?

There is no maximum. Leave Sparrow running and let your UTXOs remix indefinitely. Each remix is free and increases your anonymity set. When you need to spend, withdraw the specific UTXO you want using coin control.

Can I mix directly from a hardware wallet?

Hardware wallets do not support CoinJoin directly because the mixing process requires automatic, frequent signing of transactions. You need a hot wallet (like Sparrow) to participate in mixes. After mixing, you can send post-mix UTXOs to a hardware wallet for cold storage, but be careful to send each UTXO to a separate address and never consolidate them.

What is the minimum amount I can mix?

The smallest Whirlpool pool is 0.001 BTC (100,000 sats). Your UTXO must cover the pool denomination plus the coordinator fee plus mining fees. In practice, you need at least 110,000–120,000 sats for the 0.001 BTC pool.

Does Whirlpool work on mobile?

Following the Samourai Wallet shutdown, mobile Whirlpool support is limited. Sparrow is desktop-only. Some mobile wallets may integrate Whirlpool in the future through community coordinator support. For now, desktop remains the reliable option.

For a broader perspective, explore our Bitcoin privacy techniques guide.

{“@context”: “https://schema.org”, “@type”: “FAQPage”, “mainEntity”: [{“@type”: “Question”, “name”: “Is CoinJoin legal?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “CoinJoin is a standard Bitcoin transaction. There is no law in most jurisdictions that prohibits constructing transactions with specific structures. The legal risk relates to operating a centralized mixing service (as seen with the Samourai case), not to participating in CoinJoin as a user. However, regulations vary by jurisdiction, and some exchanges may flag coins with CoinJoin history. Consult local legal guidance for your specific situation.”}}, {“@type”: “Question”, “name”: “Will exchanges reject my mixed bitcoin?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Some exchanges use chain analysis tools that flag CoinJoin transactions. Coinbase, for example, has reportedly frozen accounts with Whirlpool-associated UTXOs. If you plan to sell mixed bitcoin on a KYC exchange, be aware of this risk. Alternatives include peer-to-peer sales or using exchanges with more privacy-friendly policies.”}}, {“@type”: “Question”, “name”: “How long should I leave my bitcoin in the mix pool?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “There is no maximum. Leave Sparrow running and let your UTXOs remix indefinitely. Each remix is free and increases your anonymity set. When you need to spend, withdraw the specific UTXO you want using coin control.”}}, {“@type”: “Question”, “name”: “Can I mix directly from a hardware wallet?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Hardware wallets do not support CoinJoin directly because the mixing process requires automatic, frequent signing of transactions. You need a hot wallet (like Sparrow) to participate in mixes. After mixing, you can send post-mix UTXOs to a hardware wallet for cold storage, but be careful to send each UTXO to a separate address and never consolidate them.”}}, {“@type”: “Question”, “name”: “What is the minimum amount I can mix?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “The smallest Whirlpool pool is 0.001 BTC (100,000 sats). Your UTXO must cover the pool denomination plus the coordinator fee plus mining fees. In practice, you need at least 110,000–120,000 sats for the 0.001 BTC pool.”}}, {“@type”: “Question”, “name”: “Does Whirlpool work on mobile?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Following the Samourai Wallet shutdown, mobile Whirlpool support is limited. Sparrow is desktop-only. Some mobile wallets may integrate Whirlpool in the future through community coordinator support. For now, desktop remains the reliable option. For a broader perspective, explore our Bitcoin privacy techniques guide.”}}]}

Search on Knowing Bitcoin