Skip to content

CoinJoin

What Is CoinJoin?

What Is CoinJoin?

CoinJoin is a type of privacy-enhancing Bitcoin practice that groups multiple UTXOs (inputs) together and spends them with other users’ transactions, making it more difficult to know which transactions belong to who (outputs).

CoinJoins help to improve the privacy of bitcoin by making it more difficult for potential attackers — such as chain analysis companies or governments — to determine which inputs generate which outputs and thus increase the privacy of the transaction.
 
CoinJoin allows you to continually mix these identical outputs with other new UTXOs of identical size to further increase the anonymity set of all participants in the mix.

Take Alice and Bob, for example.

If you give Alice a specific public address to receive bitcoin with, and she send you 0.4 BTC, and then you go and give that same address to Bob, who later sends 0.6 BTC to, then both Alice and Bob can look at your address and see that you have 1 BTC to your name. And beyond that, they can watch and see where this bitcoin goes by tracing transactions from your public address.

Clearly, that may be private information that you don’t want people to know.

That’s where CoinJoin comes in.

You can mix up your transactions with other users’ transactions to obfuscate the true ownership of each. This way, Alice and Bob won’t be able to see where that 1 BTC went from your wallet.

In order to preserve the privacy that CoinJoin offers, there are some best practices to learn that will ensure you remain private after  joining UTXOs with other users’. Some of these privacy-preserving practices are avoiding merging your doxxic change with your mixed (post-mix) bitcoin, using coin control to use the least amount of UTXOs to make payments, and spacing out when you send payments to make it more difficult for chain analysis companies to analyze your transaction “fingerprint”.

Understand Before You CoinJoin

CoinJoin is a privacy-enhancing practice, but if you do it all on public servers rather than your own Bitcoin node, you’ll lose that privacy as the public server can track each transaction before and after CoinJoining your funds.

For this reason, it’s critical that you run your own node and connect to it before CoinJoining so that transactions are only visible to you.

Additionally, use private wallets that have never interacted with the node or wallet software. You can learn how to generate your seed phrase safely and privately. After doing so, you can import the newly generated wallet into desktop wallet software like Sparrow Wallet and learn how to CoinJoin with Sparrow from there.

How Does CoinJoin Work?

There are multiple ways that you can use to CoinJoin your bitcoin, each of which come with their own advantages and tradeoffs.

Some require centralized coordinator services that break inputs down into identical sizes and then mix them with hundreds of other identical UTXOs over a long period of time. Some methods mix while in the process of sending and both the sender and receiver contribute inputs so as to obfuscate the true value of the transaction. Others like Coin swaps rely on 2 or more parties swapping coins in completely separate transactions so there is no on-chain link between them. It’s possible that this will become even more popular as atomic swaps become a more common wallet feature.

Samourai Whirlpool

Samourai Whirlpool is a popular CoinJoin method that works by pooling together multiple transactions from different users and making them indistinguishable. It allows two or more parties to combine their Bitcoin inputs into one transaction, so it looks like just one party sent the funds. This makes it difficult for third parties to track the origin of the coins, as they can’t tell who sent them and who received them. Samourai Whirlpool also offers users the ability to stay in the CoinJoin to increase the anonymity set at no additional charge.

PayJoin

PayJoin is yet another CoinJoin method that works by combining two transactions into one. Unlike Samourai Whirlpool and JoinMarket, PayJoin does not require an intermediary or coordinator; instead, it connects directly between sender and receiver via peer-to-peer communication. This makes it an attractive option for those who are looking for more privacy than what Samourai Whirlpool or JoinMarket offers.

JoinMarket

JoinMarket is another popular CoinJoin method that uses an automated market-making system to match users in need of privacy with those looking to earn a fee. It allows users to create and fill CoinJoin orders that mask the origin of funds, making them difficult to trace. With JoinMarket, users can also set their own terms for how they want their order filled, such as setting a minimum anonymity set size and fees.

Coin Swaps

Coin swaps are another method that is becoming increasingly popular. This method works by exchanging coins between two or more parties via atomic swaps. In a Coin Swap, both parties agree to exchange their respective coins for each other’s in two completely separate transactions so they are not linked in any way. This is unique from all of the other CoinJon methods because there are no links between the two parties who are looking to maximize their privacy and anonymity.

Technically coin swaps are not a CoinJoin because they avoid joining coins in the same transaction but they are a great way to increase your privacy when using bitcoin.

Risks Of CoinJoining

While CoinJoin has many benefits for your bitcoin’s privacy, there are still a few crucial risks to keep in mind when CoinJoining so that you don’t fall victim to them.

First, they require all participants to be online at the same time, which can be difficult to coordinate, so they rely on centralized coordinator services. If you don’t take the necessary privacy measures beforehand, such as running a full Bitcoin node, the coordinator will be able to see all of the transaction data.

Additionally, CoinJoins do not provide foolproof anonymity like some may think. While CoinJoin makes it more difficult to track individual coins, chain analysis makes it easier to deanonymize participants in the mix if they use poor transaction “hygiene” after mixing.

Of course, anytime you take manual action with your bitcoin, there’s a chance of user error, such as sending bitcoin to the wrong address and losing the coins forever. Be sure to always copy/paste or scan your Bitcoin addresses to avoid the potential typo error that you’re more likely to make typing it in yourself.

Especially when it comes to more advanced Bitcoin practices like CoinJoin, you want to ensure that you feel confident with each action you make. Hopefully with educational content like this, you feel more equipped to take on these tasks yourself.

Why Is CoinJoin Important?

CoinJoin is crucial for Bitcoin users to maintain their privacy. Due to the public nature of bitcoin’s distributed ledger, CoinJoining serves as one of many tools that add layers of privacy to your Bitcoin stack so that you can safely use bitcoin anonymously.

Without CoinJoining your bitcoin, it’s very easy for anyone to trace KYC-purchased bitcoin attached to your personal information.

For non-KYC bitcoin, CoinJoin is still useful too. You may not want anyone to be able to trace the flow of transactions taking place within your non-KYC wallet or see the true value of each transaction. CoinJoining non-KYC bitcoin is still a good idea in these cases to throw trackers off and further anonymize your bitcoin.

Ultimately, CoinJoin offers one of the amazing benefits that sovereign, programmable money offers, so take advantage of these tools. The road to hyperbitcoinization won’t be easy; it will come with plenty of traps to control your bitcoin, so CoinJoin and do everything else that you can to mitigate those risks.

Final Thoughts

Remember, bitcoin may be complicated as a newcomer, but anyone trying to tell you that bitcoin is difficult for the everyday user is leading you astray.

Developers create countless products for Bitcoin users to take advantage of that make interacting with the protocol easier and easier with each passing year. While CoinJoin may be a bit more involved than what typical users are used to, it’s only a matter of time before the complexity becomes further abstracted away from users.

Take advantage of CoinJoin now, and other money-saving practices like UTXO consolidation, and you’ll have yourself to thank in the long run with an anonymous Bitcoin stack without any privacy gaps.

FAQs About CoinJoin

We have compiled some of the most commonly asked questions about CoinJoin, how it works, some of the benefits and drawbacks of using it.

Is CoinJoin Safe?

Assuming you properly CoinJoin your transactions, yes, it is safe to use for your Bitcoin stack. At its core, CoinJoining just combines multiple Bitcoin payments from multiple input transactions into a single transaction with multiple receivers. This collaborative send obfuscates the true ownership of individual payments and makes it more difficult for anyone to identify the true sender and receiver.

One of the most important things to note when considering CoinJoin is that no one ever has custody of private keys belonging to someone else. This means that the funds remain under the control of their individual owners at all times. While these various methods may take some time to fully understand, they are all safe to use.

Is CoinJoin Legal?

CoinJoin is just a collaborative send between multiple senders and is legal in most jurisdictions around the world. However, it is important to note that laws and guidelines can vary from country to country, so it is always wise to check the laws and guidelines of your own jurisdiction if you’re worried about the legality of CoinJoin where you live.

Is CoinJoin Free?

No, it is not free to use a CoinJoin. To use CoinJoin, you need to pay a coordinator or a small maker fee to the person you are doing a collaborative transaction with. Additionally, there is also a miner fee that has to be paid for every transaction on the blockchain. This fee can vary depending on how much data is being processed and how urgently one wants the transaction to go through. As there are multiple rounds of mixing and potentially more inputs and outputs, the fees for using CoinJoin may add up.

In some instances, you can earn more bitcoin by providing liquidity for CoinJoin transactions.

Can You Earn Bitcoin With CoinJoin?

Yes, you can earn small amounts of bitcoin with certain CoinJoin methods. Join Market is a popular and open-source implementation of CoinJoin that also allows users to earn bitcoin. If you become a liquidity provider or maker in a JoinMarket transaction, you can earn market maker fees and a small amount of bitcoin for providing liquidity.

JoinMarket offers a secure and community-driven way to earn added value from your bitcoin. This can be a great way to earn more bitcoin while also contributing to the privacy and security of the bitcoin network.

Are CoinJoin Transactions Common?

The majority of users likely do not CoinJoin their Bitcoin transactions today. However, as the need for privacy and security in transactions increases, more wallets are slowly adding support for CoinJoin functionality. Notably, Sparrow wallet and Samourai are among the few that currently support CoinJoin. Additionally, other CoinJoin methods are being developed on the lightning network, which may increase the use of private transactions by default.

While CoinJoin transactions are not yet commonplace, their potential for increased privacy and security is one of the most important developments in Bitcoin.

What Is A CoinJoin Anonymity Set?

CoinJoin anonymity set refers to the measure of privacy that an individual can expect to receive while using CoinJoin transactions. In simple terms, the more people participating in collaborative transactions, the more difficult it is for outsiders to identify and track a given transaction. This is often referred to as “hiding in the group” by obfuscating one’s movements using the anonymity provided by the collective. The CoinJoin anonymity set can therefore be seen as a measure of the overall privacy and protection offered by a particular CoinJoin technique. As more and more individuals using CoinJoin, the greater the anon set is for all of the participants.

Do All CoinJoin Methods Offer The Same Privacy?

No, not all CoinJoin methods offer the same level of privacy. Some offer a higher degree of privacy, or the “anonymity set”, which is the size of the group used to cloak the transaction. A larger anonymity set means more privacy, as it becomes harder to isolate individual transactions in the mix. Additionally, some methods offer more liquidity, allowing for easier and faster transactions without sacrificing anonymity. However, to achieve the highest level of privacy, some CoinJoin methods require running your own bitcoin node or paying a higher coordinator fee. Ultimately, the level of privacy that a particular CoinJoin method offers depends on the specific implementation, as all methods offer different benefits and drawbacks.