CoinJoin is a Bitcoin privacy technique that combines multiple users' inputs and outputs into a single transaction, making it difficult to determine which inputs belong to which outputs. Understanding CoinJoin is essential for anyone concerned about Bitcoin's lack of native privacy.
What is CoinJoin?
CoinJoin is a method for increasing Bitcoin privacy by mixing multiple users' transactions into a single transaction. The technique breaks the direct link between inputs and outputs, making it difficult to trace funds.
Core principle: Multiple users contribute inputs and outputs to a single transaction, obscuring which inputs pay for which outputs.
Privacy improvement: CoinJoin provides k-anonymity, each output could belong to any of the k participants, not just the actual sender.
Not perfect: CoinJoin improves privacy but doesn't provide the same level of anonymity as Monero, it only obscures transaction links within the CoinJoin itself.
Coordinator role: Most CoinJoin implementations use a coordinator, a central party that facilitates transaction creation but doesn't take custody of coins.
User control: Users maintain control of their coins throughout the process, the coordinator never takes custody.
How CoinJoin works
Input selection: Each user registers coins they want to mix, typically done by the wallet automatically.
Output selection: Each wallet determines how to decompose the sum of inputs into outputs of feasible denominations, fixed or arbitrary values.
Transaction construction: The coordinator combines all users' inputs and outputs into a single transaction.
Signing: Each user signs the transaction independently, verifying they agree with the result.
Broadcast: Once all signatures are collected, the transaction is broadcast to the Bitcoin network.
Result: The transaction appears on the blockchain as a single transaction with multiple inputs and outputs, making it difficult to link specific inputs to outputs.
Wasabi Wallet
Wasabi Wallet is one of the most popular CoinJoin implementations:
Chaumian CoinJoin: Wasabi implements Chaumian CoinJoin, a protocol that allows participants to construct transactions without revealing links between inputs and outputs.
ZeroLink framework: Wasabi is built on the ZeroLink framework, defining pre-mix, post-mix, and mixing wallets.
Multi-denomination: Wasabi supports mixing multiple denominations in the same transaction, with $0.01 BTC as the lowest denomination.
Coordinator fee: Wasabi charges a coordinator fee of 0.003×a, where a is the target anonymity set, the fee increases with anonymity set size.
WabiSabi protocol: Wasabi 2.x uses the WabiSabi protocol, allowing CoinJoins with arbitrary values.
User experience: Wasabi provides a user-friendly interface, making CoinJoin accessible to non-technical users.
Trust model: Wasabi's coordinator never takes custody of coins, users maintain control throughout.
Samourai Wallet Whirlpool
Samourai Wallet's Whirlpool is another popular CoinJoin implementation:
ZeroLink foundation: Whirlpool is built on the ZeroLink framework, like Wasabi.
Fixed denominations: Whirlpool uses four distinct pools with denominations of 0.001, 0.01, 0.05, and 0.5 BTC, no multi-denomination support.
Standardized transactions: Each Whirlpool transaction features exactly five inputs and five outputs, standardized structure.
Tx0 transactions: Mixing fees are collected in Tx0 transactions, which split selected UTXOs into appropriate sizes.
Coordinator model: Whirlpool uses a coordinator, facilitating transaction creation without taking custody.
Privacy pools: Whirlpool's fixed denominations create privacy pools, groups of same-value outputs that provide anonymity.
User experience: Samourai provides a mobile-friendly interface, making Whirlpool accessible on mobile devices.
JoinMarket
JoinMarket is a different approach to CoinJoin:
Taker-maker protocol: JoinMarket uses a taker-maker model, takers pay makers to contribute their coins to the transaction.
Arbitrary values: JoinMarket supports arbitrary input and output values, unlike Whirlpool's fixed denominations.
No coordinator: JoinMarket doesn't use a central coordinator, it's a peer-to-peer protocol.
Maker fees: Makers are paid a fee for contributing their coins, creating a market for mixing services.
Privacy analysis: JoinMarket's arbitrary values can actually reduce privacy, inputs and outputs can be distinguished by value.
Example analysis: In a simple JoinMarket transaction, the taker's inputs can be identified by matching input values to change outputs.
Limitations: JoinMarket's privacy benefits are limited, the taker pays for the transaction and can be deanonymized through value analysis.
WabiSabi protocol
WabiSabi is a newer CoinJoin protocol:
Arbitrary values: WabiSabi allows CoinJoins with arbitrary input and output values, more flexible than fixed denominations.
Output denomination algorithm: Wabisabi wallets compute possible output denominations using a predefined algorithm, limiting the number of possible values.
Probability matching: Limiting output denominations assures a high probability of multiple users registering the same output values, improving privacy.
Coordinator model: Wabisabi uses a coordinator, similar to Wasabi and Samourai.
Privacy improvement: Wabisabi aims to improve privacy while allowing arbitrary values, balancing flexibility and anonymity.
Implementation: Wasabi 2.x implements Wabisabi, bringing arbitrary value support to Wasabi users.
Research: Wabisabi is an active area of research, improving CoinJoin privacy and usability.
CoinJoin privacy properties
CoinJoin provides specific privacy properties:
K-anonymity: Each output has k possible inputs, where k is the number of participants in the CoinJoin.
Transaction graph obfuscation: CoinJoin breaks the transaction graph, making it difficult to trace funds through the blockchain.
Timing analysis resistance: CoinJoin transactions are batched, timing analysis is less effective.
Amount analysis resistance: CoinJoin obscures amounts, multiple outputs of the same value create ambiguity.
Not perfect anonymity: CoinJoin doesn't provide the same level of anonymity as Monero, it's a privacy improvement, not complete anonymity.
Limitations: CoinJoin only obscures links within the transaction, it doesn't prevent analysis of the broader transaction history.
CoinJoin implementation details
Understanding implementation details is important for evaluating CoinJoin:
Coordinator role: The coordinator facilitates transaction creation, but never takes custody of coins. Users sign transactions independently, verifying they agree with the result.
Trust assumptions: Users must trust that the coordinator won't collude with others to deanonymize transactions, though the coordinator technically can't steal funds.
Input selection: Users select which coins to mix, the wallet typically handles this automatically, choosing appropriate denominations.
Output construction: The wallet determines how to split inputs into outputs, fixed denominations for Whirlpool, arbitrary values for Wasabi 2.x and JoinMarket.
Signing process: Each user signs the transaction independently, cryptographic signatures prove ownership without revealing links.
Broadcast timing: The transaction is broadcast after all signatures are collected, timing can affect privacy.
Change handling: Change outputs (leftover funds) can reveal information, linking inputs to change outputs.
Denomination matching: Fixed denominations (Whirlpool) create privacy pools, same-value outputs provide anonymity. Arbitrary values (JoinMarket) can reduce privacy through value analysis.
Anonymity set size: Larger anonymity sets provide better privacy, more participants means more possible linkages. Wasabi charges higher fees for larger anonymity sets.
Fee structure: CoinJoin transactions incur fees, coordinator fees plus Bitcoin transaction fees. The coordinator fee typically scales with anonymity set size.
CoinJoin limitations
CoinJoin has several limitations:
Coordinator trust: Most implementations require trusting a coordinator, though the coordinator never takes custody.
Small anonymity sets: Anonymity sets are often small, especially for less popular denominations.
Timing correlation: Timing correlation can link CoinJoin transactions, especially if users participate frequently.
Change outputs: Change outputs can reveal information, linking inputs to change outputs.
Value analysis: Value analysis can sometimes deanonymize transactions, especially with arbitrary values.
Not Monero-level privacy: CoinJoin provides less privacy than Monero, it's a Bitcoin-specific solution.
Regulatory risk: CoinJoin may face regulatory challenges, some jurisdictions view it as money laundering.
CoinJoin vs Monero
CoinJoin and Monero provide different privacy models:
CoinJoin: Bitcoin-specific privacy technique, improves privacy within the Bitcoin ecosystem.
Monero: Native privacy cryptocurrency, privacy is built into the protocol.
Privacy level: Monero provides stronger privacy, CoinJoin is a privacy improvement, not complete anonymity.
Transparency: Bitcoin remains transparent, CoinJoin obscures links but doesn't hide transactions.
Monero opacity: Monero transactions are opaque, sender, receiver, and amount are all hidden.
Trade-offs: CoinJoin preserves Bitcoin's transparency while improving privacy, Monero prioritizes privacy over transparency.
Use cases: CoinJoin is useful for Bitcoin users who want improved privacy, Monero is better for users who want maximum privacy.
Using CoinJoin safely
If you decide to use CoinJoin:
Choose reputable wallets: Use established wallets like Wasabi or Samourai, avoid unknown implementations.
Understand the process: Understand how CoinJoin works, don't blindly trust the software.
Verify independently: Verify transaction results, check that the CoinJoin worked as expected.
Don't reuse addresses: Don't reuse addresses after CoinJoin, create new addresses for each transaction.
Combine with other privacy: Combine CoinJoin with other privacy techniques, VPN, Tor, and good OPSEC.
Start small: Start with small amounts, test the process before committing large sums.
Understand limitations: Understand that CoinJoin has limitations, it's not a perfect privacy solution.
Consider Monero: If you need maximum privacy, consider using Monero instead, it provides stronger privacy guarantees.
CoinJoin is a valuable privacy technique for Bitcoin users, it improves privacy by breaking the link between inputs and outputs. Wasabi Wallet, Samourai Whirlpool, and JoinMarket are the most popular implementations, each with different approaches and trade-offs. Wasabi uses Chaumian CoinJoin with multi-denomination support, Samourai uses fixed-denomination pools, and JoinMarket uses a taker-maker protocol with arbitrary values. While CoinJoin provides meaningful privacy improvements, it has limitations, small anonymity sets, timing correlation, and value analysis can still reveal information. For users who need maximum privacy, Monero provides stronger guarantees, but for Bitcoin users who want improved privacy while staying in the Bitcoin ecosystem, CoinJoin is a valuable tool. Always use reputable implementations, understand the process, and combine CoinJoin with other privacy practices for best results.
The Peter Todd CoinJoin comparison, MIT DCI CoinJoin analysis, arXiv CoinJoin study, Bitcoin Wiki CoinJoin, and arXiv CoinJoin analysis are the primary sources. For related coverage, see our CoinJoin guide and Bitcoin privacy tools.
Comments 0