CoinJoin and Mixing: Understanding Bitcoin On-Chain Privacy
Table of Contents
- Introduction
- Why Mixing Is Necessary
- What Is CoinJoin?
- Historical and Current CoinJoin Tools
- PayJoin: The Subtle Alternative
- Other Mixing Techniques
- Risks and Legal Considerations
- Detailed Technical Workings
- Recommended Tools in 2025
- Future Outlook
- Summary Table
- FAQ
- Conclusion
- Internal Links
- Sources and Resources
Suggested URL: /privacy/coinjoin-mixing-bitcoin
Category: Privacy and Anonymity
Summary: Complete guide to Bitcoin mixing techniques: CoinJoin, PayJoin, and alternatives. Technical workings, available tools, and the state of play after the 2024 shutdowns.
Introduction
Bitcoin is traceable, but mixing allows you to break the links between transactions.
Bitcoin is often described as "pseudonymous" rather than anonymous. Every transaction is publicly recorded on the blockchain, allowing anyone -- and especially chain analysis companies -- to trace the flow of funds.
Mixing techniques aim to break these traceability links by blending the bitcoins of multiple users. Among them, CoinJoin has established itself as the most robust and widely used solution.
However, 2024 marked a turning point: the shutdown of Wasabi Wallet and regulatory pressures upended the mixing ecosystem. This article takes stock of the available techniques, how they work, and their future.
1. Why Mixing Is Necessary
Every Bitcoin transaction is public, traceable by professional chain analysts.
1.1 The Problem of Bitcoin Traceability
On the Bitcoin blockchain, every transaction reveals:
| Information | Visibility |
|---|---|
| Sending addresses | Public |
| Receiving addresses | Public |
| Amounts | Public |
| Timestamp | Public |
| Links between transactions | Traceable (inputs/outputs) |
1.2 The Chain Analysis Industry
Companies like Chainalysis, Elliptic, and CipherTrace have developed sophisticated tools to:
- Identify address owners
- Trace fund flows between addresses
- Group addresses belonging to the same entity (clustering)
- Provide this information to governments and exchanges
Techniques used:
| Technique | Description |
|---|---|
| Common input ownership | Inputs in the same transaction belong to the same owner |
| Change detection | Identifying the "change" output that returns to the sender |
| Dust attacks | Sending tiny amounts to link addresses together |
| Timing analysis | Correlating transactions by their timestamps |
1.3 Practical Consequences
Without privacy protection:
- Your employer can see your purchases if you are paid in BTC
- Your complete financial history is accessible
- Your wealth becomes a potential target
- Third parties can refuse your BTC deemed "tainted"
2. What Is CoinJoin?
A collaborative transaction that mixes the bitcoins of multiple users to break traceability.
2.1 Fundamental Principle
CoinJoin, proposed by Gregory Maxwell in 2013, exploits a property of Bitcoin: a transaction can have multiple inputs from multiple owners.
Normal transaction:
Alice (1 BTC) ─────────────────► Recipient (1 BTC)
CoinJoin transaction:
Alice (1 BTC) ──┐
Bob (1 BTC) ──┼──► 4 outputs of 1 BTC each
Charlie (1 BTC) ──┤ (no one knows who received what)
David (1 BTC) ──┘
The analyst sees 4 inputs and 4 identical outputs, but cannot determine which input corresponds to which output.
2.2 Conditions for Effectiveness
For a CoinJoin to be effective:
| Condition | Importance |
|---|---|
| Identical amounts | Critical -- enables indistinguishability |
| Number of participants | Higher = better anonymity set |
| No timing link | Avoid temporal correlations |
| No address reuse | Preserve post-mix anonymity |
2.3 The Anonymity Set
The anonymity set measures the number of possible outputs for each input.
Example:
- CoinJoin with 50 participants and identical outputs
- Anonymity set = 50
- Probability that a specific output came from a specific input = 2%
The larger the anonymity set, the better the privacy.
3. Historical and Current CoinJoin Tools
Wasabi and Samourai shut down in 2024, JoinMarket remains the decentralized reference.
3.1 Wasabi Wallet (2018-2024)
History: Wasabi democratized CoinJoin with its WabiSabi protocol, enabling mixes with anonymity sets of 100+.
Shutdown: In 2024, Wasabi shut down its coordinator, citing regulatory pressure and legal risks.
Legacy: The code remains open source; alternative coordinators exist but with less liquidity.
3.2 JoinMarket
How it works: A decentralized marketplace where "makers" offer their bitcoins for mixing, and "takers" pay to join.
| Aspect | Detail |
|---|---|
| Type | Decentralized (no central coordinator) |
| Model | Makers earn fees, takers pay |
| Anonymity set | Variable (depends on available makers) |
| Availability | Active in 2025 |
Advantage: Censorship-resistant because it is decentralized.
Disadvantage: Technical interface, less accessible to beginners.
3.3 Whirlpool (Samourai Wallet)
Situation: In April 2024, the developers of Samourai Wallet were arrested by the U.S. DOJ. The Whirlpool service is compromised.
Impact: Demonstrated that centralized coordinators are vulnerable to prosecution.
3.4 State of Play in 2025
| Tool | Status | Functional |
|---|---|---|
| Wasabi Wallet | Coordinator shut down | Partial (alternative coordinators) |
| Samourai/Whirlpool | Founders arrested | Compromised |
| JoinMarket | Active | Functional |
| Jam (JoinMarket GUI) | Active | Functional |
4. PayJoin: The Subtle Alternative
A discreet two-participant CoinJoin that breaks classic analysis heuristics.
4.1 Principle
PayJoin (or P2EP -- Pay-to-EndPoint) is a two-participant CoinJoin disguised as a normal transaction.
Normal transaction:
Alice (1 BTC) ──► Merchant (0.5 BTC) + Alice change (0.5 BTC)
PayJoin:
Alice (1 BTC) + Merchant (0.3 BTC) ──► Merchant (0.8 BTC) + Alice change (0.5 BTC)
The merchant adds one of their own inputs, breaking the "common input ownership" heuristic.
4.2 Advantages
| Advantage | Description |
|---|---|
| Stealth | Looks like a normal transaction |
| No extra cost | No additional fees |
| Breaks heuristics | Invalidates standard analysis |
| Bilateral | Only 2 participants needed |
4.3 Implementations
- BTCPay Server: Supports PayJoin natively
- Sparrow Wallet: Can initiate PayJoins
- BlueWallet: Experimental support
4.4 Limitations
- Requires the recipient's cooperation
- Poorly adopted by merchants
- Smaller anonymity set than a classic CoinJoin
5. Other Mixing Techniques
Centralized mixers are obsolete; atomic swaps and submarine swaps serve as alternatives.
5.1 Centralized Mixers (Obsolete)
Classic centralized mixers work as follows:
- You send BTC to the mixer
- The mixer sends you back "clean" BTC
- The mixer keeps a log (or claims not to)
Problems:
- Risk of theft (exit scam)
- Logs potentially retained
- Targeted by authorities (ChipMixer, Blender shut down)
- Funds "tainted" because they passed through a known mixer
Verdict: Obsolete and dangerous in 2025.
5.2 Atomic Swaps
Decentralized cross-chain exchange (e.g., BTC <-> XMR) without an intermediary.
Advantage: Breaks traceability by passing through another chain.
Limitation: Technical complexity, limited liquidity.
5.3 Submarine Swaps
Exchange between Bitcoin on-chain and the Lightning Network.
BTC on-chain ──► Lightning ──► BTC on-chain (different address)
Breaks the traceability continuity between the two on-chain transactions.
6. Risks and Legal Considerations
Legal for privacy purposes, but risk of rejection by certain exchanges.
6.1 Legal Situation in France
| Action | Legality |
|---|---|
| Using CoinJoin | Legal (no explicit prohibition) |
| Operating a coordinator | Gray area (risky) |
| Mixing to launder money | Illegal (money laundering) |
| Not declaring capital gains | Illegal (tax fraud) |
6.2 Practical Risks
Exchanges and "tainted coins":
- Some exchanges refuse BTC that have passed through known mixing services
- Automatic flagging by Chainalysis
- Possible account freeze and request for justification
Enhanced KYC:
- Request for proof of origin of funds
- Justification of complete transaction history
6.3 Best Practices
- Document your transactions: Keep proof of legitimate origin
- Use unmixed outputs for exchanges: Keep a "clean" portion
- Declare your capital gains: Mixing does not exempt you from tax obligations
- Understand the risks: Some services may refuse your funds
7. Detailed Technical Workings
From registration to broadcast, understanding each step of the CoinJoin protocol.
7.1 Steps of a CoinJoin
Phase 1: Registration
- Participants register with the coordinator (or the marketplace for JoinMarket)
- Each participant provides their desired inputs and outputs
Phase 2: Transaction Construction
- The coordinator (or protocol) builds the joint transaction
- All inputs and outputs are aggregated
Phase 3: Signing
- Each participant signs their part of the transaction
- Use of Schnorr signatures for better privacy (post-Taproot)
Phase 4: Broadcast
- The complete transaction is broadcast to the network
- Participants receive their mixed outputs
7.2 Structure of a CoinJoin Transaction
Inputs:
├── Alice: 0.1 BTC (signature A)
├── Bob: 0.1 BTC (signature B)
├── Charlie: 0.1 BTC (signature C)
└── David: 0.1 BTC (signature D)
Outputs:
├── ???: 0.099 BTC (fees deducted)
├── ???: 0.099 BTC
├── ???: 0.099 BTC
└── ???: 0.099 BTC
(+ change outputs if necessary)
7.3 Importance of Equal Outputs
If outputs are of different amounts, correlation becomes possible again:
Bad example:
Inputs: 0.5 + 0.3 + 0.2 BTC
Outputs: 0.5 + 0.3 + 0.2 BTC
→ Obvious correspondence by amounts
8. Recommended Tools in 2025
JoinMarket and Sparrow Wallet as decentralized solutions post-2024 shutdowns.
8.1 For CoinJoin
| Tool | Type | Difficulty | Recommendation |
|---|---|---|---|
| JoinMarket (Jam) | Decentralized | 3/5 | Recommended |
| Alternative Wasabi coordinators | Semi-decentralized | 4/5 | Verify reputation first |
| BTCPay + PayJoin | Payments | 2/5 | For merchants |
8.2 Complementary Tools
| Tool | Usage |
|---|---|
| Sparrow Wallet | Coin control, PayJoin, visualization |
| Umbrel/Start9 | Personal node (privacy prerequisite) |
| Tor | Network protection |
8.3 Recommended Workflow
- Run your own Bitcoin node
- Use Sparrow Wallet for coin control
- Perform CoinJoins via JoinMarket
- Use separate addresses post-mix
- Never consolidate mixed outputs with unmixed outputs
9. Future Outlook
Taproot improves discretion; CISA and decentralization are shaping the future of mixing.
9.1 Impact of Taproot
Taproot (activated in 2021) improves CoinJoin:
- Schnorr signatures: A single common signature for all participants
- Smaller footprint: CoinJoins look more like normal transactions
- MAST: Complex scripts hidden
9.2 Cross-Input Signature Aggregation (CISA)
A future proposal allowing the aggregation of all input signatures into a single one. This would reduce fees and improve the privacy of all CoinJoins.
9.3 Increased Decentralization
The post-2024 trend is toward total decentralization:
- No centralized coordinator = no single point of failure
- JoinMarket leads the way
- New protocols in development
10. Summary Table
Comparative summary of the different mixing techniques available in 2025.
| Technique | Anonymity Set | Complexity | Regulatory Risk | Availability 2025 |
|---|---|---|---|---|
| CoinJoin (JoinMarket) | Variable (5-100) | High | Medium | Available |
| PayJoin | 2 | Low | Low | Available |
| Wasabi (alt. coordinators) | High | Medium | Medium | Partial |
| Whirlpool | High | Medium | High | Unavailable |
| Centralized mixer | Variable | Low | Very high | Unavailable |
FAQ
Q1: Is CoinJoin illegal?
No. Using CoinJoin to protect your privacy is legal in France and in most Western countries. What is illegal is using any tool (CoinJoin or otherwise) to launder money or commit tax fraud.
Q2: Can exchanges refuse my bitcoins after a CoinJoin?
Yes, some exchanges may flag funds that have passed through known mixing services. This is a commercial policy, not a legal obligation. Keep some "unmixed" BTC for interactions with exchanges.
Q3: Is JoinMarket safe to use?
JoinMarket is decentralized and open source, which reduces the risk of compromise. However, like any tool, it requires proper use. Run your own node and follow best practices.
Q4: What anonymity set should I aim for?
Generally, an anonymity set of 50+ is considered good. Purists aim for 100+. The important thing is not to "demix" afterward by consolidating with unmixed outputs.
Q5: Does mixing eliminate all traces?
No. Mixing significantly improves privacy but is not perfect. Sophisticated analysis can sometimes identify patterns. Combine it with other practices (Tor, personal node, coin control).
Conclusion
CoinJoin remains the most powerful tool for improving the privacy of on-chain Bitcoin transactions. Despite the shutdown of Wasabi and the prosecution of Samourai, decentralized alternatives like JoinMarket persist and continue to develop.
Key takeaways:
- Mixing is legal for protecting your privacy
- JoinMarket is currently the best decentralized option
- PayJoin offers a subtle alternative for payments
- Never consolidate mixed and unmixed outputs
- Tax reporting obligations remain despite mixing
The future of mixing lies in total decentralization and native integration into wallets, making privacy accessible to everyone without the risk of a central point of failure.
Internal Links
- Privacy Coins - Monero, Zcash -- Alternative: natively private cryptocurrencies
- Lightning Network - Privacy -- Privacy on Layer 2
- VPN and Tor for Crypto -- Network protection
- Coldcard Guide -- Key security
- Multisig 2-of-3 -- Advanced protection
Related Articles -- Privacy
- Lightning Network Privacy and Confidentiality
- Privacy Coins: Monero, Zcash, and Alternatives
- VPN and Tor for Crypto Transactions
Sources and Resources
Technical Documentation
- Original CoinJoin: bitcointalk.org (Gregory Maxwell, 2013)
- JoinMarket: github.com/JoinMarket-Org/joinmarket-clientserver
- PayJoin BIP78: github.com/bitcoin/bips/blob/master/bip-0078.mediawiki
Tools
- Sparrow Wallet: sparrowwallet.com
- Jam (JoinMarket GUI): jamapp.org
- BTCPay Server: btcpayserver.org
Analysis
- Bitcoin Privacy Guide: bitcoiner.guide/privacy
- Academic Research: Publications on Bitcoin traceability
Article written in December 2025. The mixing ecosystem evolves rapidly. Check the status of tools before use.