A CoinJoin is the most direct answer to Bitcoin’s main privacy weakness and the one most often misunderstood as a laundering mechanism or a mixer. It is neither. Nobody takes custody of anything, no coins are swapped, and the whole thing is a single ordinary transaction that happens to have several owners.
What is a CoinJoin, mechanically?
Several people each contribute one or more inputs to one transaction. The transaction creates outputs of identical value back to addresses each participant controls. Every participant signs only their own inputs, so no one can move anyone else’s money, and the transaction is invalid unless all of them sign.
That is the whole mechanism. There is no pooling, no intermediary holding funds, and no moment at which your coins belong to someone else. If the process fails, nothing has moved.
What makes it useful is a consequence of Bitcoin’s structure rather than anything clever added on top: a transaction records inputs and outputs and says nothing about which input paid for which output. Normally the mapping is obvious because one person owns everything. With equal outputs and multiple owners, the mapping stops existing.
Why does it break the main heuristic?
Chain analysis leans hardest on the assumption that inputs spent together share an owner. It is a good assumption because it is usually true, and it is the foundation of clustering.
A CoinJoin makes that assumption produce a wrong answer. An analyst applying it will merge the clusters of every participant into one, which is not merely a failure to learn something — it is an incorrect conclusion introduced into their dataset.
The effect extends past the participants. Every CoinJoin degrades the reliability of the heuristic everywhere, because an analyst now has to decide whether any given transaction is a joint one. That is the strongest argument for using these tools even when you personally have nothing to hide: the protection is partly collective.
What is an anonymity set, and how big is yours?
The honest measure of what you gained. If a CoinJoin produced fifty identical outputs, each one could belong to any of fifty participants, and your anonymity set is fifty.
Three things shrink it immediately.
Outputs that are not equal are not protected. A participant contributing an unusual amount, or receiving a differently sized output, is identifiable by that difference alone.
Participants who are the same person do not count. A coordinator running many of the slots, or a single user joining with several inputs, reduces the real set well below the apparent one, and from outside the two are indistinguishable.
And the set is a property of one transaction, not of a coin. It describes the uncertainty at that moment, and every subsequent action either preserves it or spends it.
Who assembles it, and what do they learn?
Somebody has to collect the inputs, agree the amounts and distribute the transaction for signing. That coordinator is the weak point.
A naive coordinator learns everything: which input belongs with which output, which is precisely the mapping the transaction hides from everyone else. You would have replaced public linkage with private linkage held by a single party.
Modern implementations solve this with blind signatures. A participant registers an input and receives a credential the coordinator cannot link to it, then uses that credential to register an output through a separate connection. The coordinator learns that some input and some output are valid, and not that they belong together.
This works and it carries assumptions. The participant must use separate network connections for the two steps, or the coordinator links them by address. The implementation must be correct, which is not something most users can evaluate. And the coordinator can still censor by refusing specific inputs.
What is toxic change?
If your input does not divide evenly into the standard denomination, the remainder comes back as a change output — and that output is not anonymous. It is linked to the inputs you contributed, which are linked to wherever they came from.
This is where most practical failures happen. The mixed outputs are protected; the change is a labelled fragment of your old identity. Spend it together with a mixed output later and you have linked the two, undoing the CoinJoin with one transaction.
Good wallets track this and refuse to combine the two categories, which is coin control doing the one job it is best at. The user has to understand the distinction regardless, because the wallet cannot stop someone from sweeping everything into a new wallet a year later and forgetting why it mattered.
How do people undo their own privacy afterwards?
Almost always in one of three ways, and all of them are ordinary behaviour rather than mistakes anyone would notice making.
Consolidating. Combining several mixed outputs into one transaction proves they share an owner. The anonymity sets intersect, and the intersection is usually much smaller than either.
Spending into a named account. Sending a mixed output to an exchange withdrawal address, or to any service that knows your identity, attaches your name to it. The CoinJoin protected its history and not its future.
Amount and timing. Mixing a distinctive amount and spending it shortly afterwards narrows the candidates sharply, even when the structure is sound. An analyst who knows roughly when you acquired coins and roughly how many can often pick your outputs out of a set of fifty without breaking anything at all.
The general shape is that a CoinJoin buys uncertainty at one moment, and most users spend that uncertainty within weeks without realising they are spending anything.
What does it cost?
Three costs, and only one of them is the fee.
The mining fee. A transaction with dozens of inputs and dozens of outputs is large, and the cost is shared among participants. Per person it is usually modest, and it recurs if you run multiple rounds to grow the anonymity set.
The coordinator fee. Most implementations charge for the service, typically a small percentage, and some charge per round.
The output fragmentation. This is the cost nobody budgets for. You began with one output and now hold many small ones of a fixed denomination. Every future payment must gather several of them, which makes your transactions larger and more expensive forever — and gathering them is exactly the consolidation that undoes the privacy. The fragmentation and the protection are the same thing viewed from different sides, which is why there is no setting that avoids both.
A practical consequence follows: mixing is worth doing with amounts you intend to hold, and poorly suited to a balance you spend from frequently. Doing it to coins in constant circulation buys uncertainty you will consume within the month and pay for repeatedly.
Is a CoinJoin visible?
Yes, and this is a real cost rather than a detail.
A transaction with many equal-valued outputs is structurally obvious. Anyone can identify the pattern, and some custodians and exchanges treat coins with that history differently — delaying withdrawals, requesting explanations, or declining deposits. Whether that is reasonable is a separate argument, and it is the one privacy with nothing to hide takes up; that it happens is a fact to plan around.
The alternatives trade this away. Payjoin produces a transaction that looks like an ordinary payment, which is the opposite property: invisible but with an anonymity set of essentially one, protecting against clustering rather than providing uncertainty. Silent Payments remove address reuse without any coordination at all and do nothing about clustering.
These are complements rather than competitors, and no single tool covers the field.
Check it yourself
The pattern is easy to recognise once you have seen it, and recognising it is most of the understanding.
# Look at the output values. A round of equal amounts among varied ones
# is the signature of the structure.
bitcoin-cli getrawtransaction <txid> true | grep -A2 '"value"'
# Your own coins, with the histories you would be merging.
bitcoin-cli listunspent
The exercise worth doing is on your own wallet rather than someone else’s transaction: list your unspent outputs and ask which of them you would be willing to spend in the same transaction. If the answer is all of them, coin control is not doing anything for you yet.
What remains uncertain
How much residual linkability survives in practice. Published analyses of post-mix behaviour suggest a substantial fraction of users undo their own protection, and there is no agreed figure. The tooling has improved faster than the measurement has.
Whether coordinator assumptions hold. Blind-signature designs are sound on paper. Whether deployed implementations, with their network behaviour and their operational realities, deliver the property they describe is not something an ordinary user can verify.
How custodial treatment develops. Discrimination by coin history is currently inconsistent and informal. Whether it hardens into standard policy determines whether privacy tools carry a practical cost, and that is a regulatory question with no settled answer.
Whether the collective benefit survives low usage. The heuristic-degrading effect scales with adoption. At current levels an analyst can treat CoinJoins as a recognisable special case and carry on, which is close to the opposite of the intended outcome.
Sources
- TechnicalBitcoin Optech — CoinJoin ↗
- PrimaryBIP 78 — A simple Payjoin proposal ↗
- PrimaryBIP 352 — Silent Payments ↗
- First-partyBitcoin.org — Protect your privacy ↗