• Catalog
  • Blog
  • Tor Relay
  • Jabber
  • Secret Notes
  • Temp Mail
  • Get Tor Browser
  • Crypto
    Bitcoin CoinJoin privacy technique guide - how mixing transactions work, implementations, legal risks

    CoinJoin is the most widely deployed privacy technique in Bitcoin, and one of the most misunderstood. At its core it is simple: instead of sending all your bitcoin in one transaction, you combine your inputs with the inputs and outputs of several unrelated users in a single on-chain transaction, making it dramatically harder for blockchain analysts to determine which coins belong to whom. In practice, CoinJoin has become both a tool for ordinary privacy-conscious users and a flashpoint in legal enforcement, the arrest and conviction of the Samourai Wallet developers showed that U.S. authorities are willing to treat privacy-enhancing Bitcoin software as unlicensed money transmission. This guide explains how CoinJoin actually works, which implementations exist today, what it does and does not protect against, the legal landscape, and how to use it responsibly.

    What CoinJoin is and what problem it solves

    Bitcoin's blockchain is a public ledger. Every transaction permanently records which inputs were spent and which new addresses received funds. Because those inputs and outputs are linked inside a single transaction, anyone inspecting the ledger can apply a trivial heuristic: all inputs in a transaction almost certainly belong to the same owner. That single rule is the foundation of most chain analysis. If an analyst ever connects one of your addresses to your identity, through an exchange withdrawal, a published donation address, or a merchant record, they can reconstruct your financial history by following those links forward and backward in time.

    CoinJoin attacks this linkage directly. In a CoinJoin transaction, multiple users combine their coins into one transaction where each participant contributes inputs of roughly equal value and receives back a same-value output. The result is that each participant's payment output is one of many identical-looking outputs, and the observer cannot tell which inputs funded which outputs without breaking the transaction's internal links. The privacy gain is expressed as an anonymity set: if you join a CoinJoin with 49 other participants, there are roughly 50 plausible candidates for your coin, not one. For a deeper look at the underlying technique, see our earlier explainer on CoinJoin as a Bitcoin privacy technique, and for the tracing side of the equation, read how blockchain analysis traces Bitcoin transactions.

    How CoinJoin transactions work technically

    Every CoinJoin follows the same three-phase structure, though implementations differ in the details:

    Input selection. Each participant chooses which unspent transaction outputs (UTXOs) they want to mix. Most implementations favor equal-value inputs so that the resulting outputs can be made indistinguishable.

    Output construction. This is where designs diverge. The original ZeroLink protocol, used by early Wasabi and Samourai Whirlpool, produces outputs of fixed denominations, for example, 0.1, 0.05, 0.01, or 0.001 BTC, with each participant receiving one equal output plus optional change. JoinMarket uses a taker-maker model: a taker wants their transaction mixed and pays one or more makers to contribute inputs and equal-value outputs. The maker's fee is the privacy service; the taker compensates them for participating.

    Signing. Because a Bitcoin transaction requires every input's signature, each participant signs only their own inputs. A coordinator (or the taker's software, in JoinMarket's case) assembles the transaction, but crucially the coordinator never holds anyone's private keys, they merely facilitate construction. After all signatures are collected, the transaction is broadcast to the Bitcoin network like any other.

    Two properties are worth noting. First, CoinJoin transactions are perfectly valid Bitcoin transactions, no protocol changes, no special consensus rules, no trusted party holding funds. Second, the privacy guarantee is probabilistic, not cryptographic. Unlike Monero's ring signatures, which hide the sender mathematically, CoinJoin only creates ambiguity: an observer sees many plausible interpretations and must rely on heuristics to narrow them down.

    The main CoinJoin implementations

    Wasabi Wallet. Wasabi is the most widely used CoinJoin wallet. Its current versions (the 2.x line, built on the WabiSabi protocol) coordinate CoinJoin sessions where participants contribute arbitrary-denomination inputs and receive equal-value outputs with optional change. Wasabi also supports PayJoin, a two-party protocol where sender and receiver cooperate to break the common-input-ownership heuristic on payment transactions. Fees are modest, and the software is closed-source but widely audited by the community. Our comparison of CoinJoin tools including Wasabi, Whirlpool, and JoinMarket covers the trade-offs in detail.

    Samourai Wallet / Whirlpool. Samourai's Whirlpool was the first production CoinJoin implementation, built on the ZeroLink protocol with fixed-denomination pools (typically five or eight equal outputs). It was considered the gold standard for privacy because Whirlpool also included features like Stonewall and Ricochet that combined CoinJoin with transaction-shape obfuscation. However, the U.S. Department of Justice shut down Samourai in April 2024, seized its infrastructure, and in late 2025 the developers were convicted and sentenced to prison terms for conspiracy to operate an unlicensed money transmitting business and conspiracy to launder money. The Whirlpool protocol itself is open-source and was incorporated into other wallets, but the original service is dead. This case is covered in depth in our article on the Samourai Wallet executives' arrest.

    JoinMarket. JoinMarket is the most decentralized CoinJoin implementation. There is no central coordinator: takers and makers connect peer-to-peer and negotiate fees directly. Makers offer liquidity and earn fees for each CoinJoin they participate in; takers pay those fees. JoinMarket's model has a subtle weakness documented by researcher Peter Todd, in a typical JoinMarket transaction, a careful analyst can sometimes infer which inputs belong to the taker versus the maker by analyzing fee and change patterns, but in larger sessions the anonymity set remains strong. JoinMarket is command-line oriented and best suited to users comfortable with technical tooling.

    Other options. PayJoin (BIP78) is not a CoinJoin in the strict sense, it involves only two parties, but it complements CoinJoin by privatizing individual payments. CoinSwap and atomic-swap-based techniques offer an alternative that avoids on-chain mixing entirely. For a feature-by-feature breakdown, see our comparison of Wasabi, Samourai, JoinMarket, JAM, PayJoin, and CoinSwap.

    What CoinJoin actually protects, and what it doesn't

    What it does well: CoinJoin breaks the most basic and most powerful chain-analysis heuristic, the assumption that all inputs in a transaction share an owner. After a well-executed CoinJoin, an analyst looking at your coins sees a transaction with dozens of inputs and outputs and cannot determine which output is yours without additional information. Repeated CoinJoins, spaced over time, compound this effect: each round multiplies the plausible candidate set, and the links to your pre-mix history are severed at the transaction boundary.

    What it does not do:

    • It is not anonymity. CoinJoin provides plausible deniability about which coins are yours, not secrecy about the fact that you used Bitcoin. Timing analysis, joining a CoinJoin session immediately before or after a known transaction, can narrow the candidate set. Fee patterns, input amounts, and change-output heuristics can also leak information, especially in small sessions or poorly configured wallets.
    • It does not protect your endpoints. The blockchain is only one layer of surveillance. If you reveal your address to a merchant, receive coins from a KYC exchange, or run your wallet on a network that links your IP address to transactions, CoinJoin cannot undo that. Network-level privacy (Tor, VPN, or both) and address hygiene matter as much as on-chain mixing.
    • It does not make you immune to investigation. Law enforcement agencies combine chain analysis with off-chain evidence, exchange records, device forensics, informants, and cooperation from wallet providers. A CoinJoin raises the cost of tracing, it does not make tracing impossible.
    • Change outputs can betray you. If your CoinJoin wallet creates a change output and later spends it in an obvious way, analysts may link the change back to you. Best practice is to treat post-mix coins carefully: avoid sending them to known-identity services, and prefer spending them through further CoinJoins or CoinSwaps.

    Research supports a measured view. A 2025 arXiv study analyzing input-output mappings in major CoinJoin designs found that analysis techniques can reduce anonymity set sizes by 10-50% in some cases, though correctly attributing coins to their owners remains very difficult even with improved algorithms. The practical takeaway: CoinJoin meaningfully raises the bar for tracing, but it is a privacy tool, not a magic eraser.

    Legal risks and the enforcement landscape

    This is the section most guides skip, and it is the one most worth reading carefully.

    The Samourai precedent. In April 2024, the U.S. Attorney's Office for the Southern District of New York charged Samourai Wallet's CEO and CTO. Prosecutors alleged the wallet facilitated over $2 billion in Bitcoin transactions, including funds tied to darknet markets, and argued that Whirlpool's CoinJoin functionality constituted operating an unlicensed money transmitting business under 18 U.S.C. § 1960 and conspiracy to launder money under 18 U.S.C. § 1956. The defense that Samourai was non-custodial, users always held their own keys, did not prevent convictions. By late 2025 both developers had pleaded guilty and received multi-year prison sentences. The legal theory matters: prosecutors treated the coordination of mixing transactions and the collection of fees as the regulated activity, not custody of funds.

    FinCEN and MSB rules. FinCEN's 2019 guidance distinguishes custodial from non-custodial software: providers of self-hosted, non-custodial wallets generally fall outside money services business (MSB) registration requirements. However, any service that exercises control over funds, or that operates as an exchanger or transmitter, can trigger MSB obligations including registration, AML programs, and suspicious activity reporting. FinCEN has also moved against centralized mixers directly, proposing rules in 2023 to designate international convertible virtual currency mixing as a class of transactions of primary money laundering concern.

    OFAC and strict liability. OFAC sanctions apply on a strict-liability basis: a U.S. person can face civil penalties for transacting with a sanctioned address even without knowledge of the sanctions connection. Coins that have passed through sanctioned mixing addresses can taint downstream transactions. Businesses and exchanges screen for this; individuals should understand that mixing does not launder provenance, it obscures it, which is exactly what makes mixed coins a compliance red flag for regulated entities.

    Practical risk assessment. Using a CoinJoin wallet personally is not itself a crime in most jurisdictions, and self-hosted tools like Wasabi or JoinMarket remain available. The risks are contextual: (1) using mixing to conceal proceeds of crime is money laundering in most countries; (2) in the U.S., the Samourai prosecution signals that developers and operators of mixing infrastructure face serious exposure, and users should be aware that their transaction patterns may attract scrutiny; (3) some jurisdictions treat privacy coins and mixers more aggressively than others, check local law. This article is not legal advice; if you have exposure through business activity or significant volumes, consult a qualified attorney.

    Best practices for using CoinJoin safely

    If you decide CoinJoin fits your threat model, these practices materially improve both your privacy and your risk profile:

    • Decouple identity from coins before mixing. Do not CoinJoin coins that are directly traceable to your KYC exchange account in the same transaction history. Ideally, break the chain first, for example, by transacting through an intermediate wallet or using a CoinSwap.
    • Use your own infrastructure where possible. Wallets like Wasabi and JoinMarket can be configured to connect through Tor. Avoid hosted coordinators you do not trust; the coordinator cannot steal your keys, but it can log metadata (session timing, amounts) that aids analysis.
    • Prefer larger anonymity sets. A CoinJoin with 50+ participants provides far stronger ambiguity than one with five. Fixed-denomination implementations like Whirlpool enforce minimum pool sizes for this reason. Wait for a full session rather than forcing an early exit.
    • Don't reuse addresses or create obvious change patterns. After mixing, treat each output as a fresh identity. Avoid consolidating mixed coins with unmixed ones, and avoid sending mixed coins to services that will tag them (exchanges, known merchants).
    • Combine techniques. CoinJoin alone does not hide your network activity or your identity at the endpoints. Pair it with Tor or a VPN, good address hygiene, and, if your threat model requires stronger guarantees, consider privacy coins like Monero for appropriate contexts. Our guide to Bitcoin versus Monero privacy helps calibrate when each is appropriate.
    • Understand fees and timing. CoinJoin costs include coordinator/maker fees plus slightly elevated mining fees for larger transactions. Sessions may take minutes to hours to fill. Plan transactions accordingly and avoid patterns (always joining at midnight, always the same denomination) that become identifying fingerprints.

    CoinJoin versus alternatives: mixers, CoinSwaps, and privacy coins

    CoinJoin is one tool among several. Centralized mixers pool funds and redistribute them, they offer strong obfuscation but require trusting the operator and have been aggressively prosecuted (see our explainer on crypto mixers and tumblers). CoinSwap achieves similar goals without a visible on-chain mixing transaction: you trade coins via hash-locked contracts so no single transaction reveals the linkage, though the technique is more complex and less battle-tested. PayJoin privatizes individual payments cheaply but only breaks the two-party link. Monero provides cryptographic privacy by default, ring signatures and stealth addresses hide sender, receiver, and amount, at the cost of a smaller ecosystem and its own legal/regulatory headwinds.

    The honest framing: CoinJoin is the best on-chain privacy technique available for Bitcoin specifically because it requires no protocol changes, no trusted custodian, and produces transactions indistinguishable from ordinary Bitcoin payments. Its weakness is that it manages ambiguity rather than eliminating it, a determined analyst with off-chain data can still connect dots. For most users whose threat model is "I don't want my transaction graph published," CoinJoin is sufficient. For users facing targeted investigation, it should be one layer in a broader opsec stack.

    Recommendations

    For everyday privacy, Wasabi Wallet offers the best balance of usability, anonymity set size, and active development, though its closed-source nature means you are trusting the developers' implementation. JoinMarket is the choice for maximally decentralized coordination if you are comfortable with command-line tools. Whirlpools-style fixed-denomination pools remain the simplest mental model but the original Samourai service is gone; seek maintained open-source implementations of the protocol. Whatever you choose, run it over Tor, keep coins segregated by purpose, never mix funds you cannot afford to have associated with mixing, and stay current on enforcement developments, the legal ground around Bitcoin privacy tools is still shifting.

    Finally, remember the limits of this guide: laws differ by country, enforcement is evolving, and no tool makes illegal activity legal. CoinJoin is a legitimate privacy technology used by journalists, businesses, and ordinary users who simply do not want their financial lives broadcast to the world. Use it for lawful purposes, understand the risks, and combine it with the rest of your privacy stack rather than treating it as a standalone solution.

    Sources and further reading

    This article draws on the following sources and our own earlier coverage:

    Disclaimer: This article is for informational purposes only and does not constitute legal advice. Cryptocurrency privacy laws vary by jurisdiction and are evolving rapidly. Consult a qualified attorney before using mixing or privacy tools for anything beyond personal, lawful transactions.

    Author OnionInfoDesk
    CoinJoin explained: Bitcoin privacy technique
    CoinJoin tools compared: Wasabi, Whirlpool, JoinMarket
    How to spend Bitcoin privately: tools and threat models
    How blockchain analysis traces Bitcoin transactions

    Comments 0

    Add comment