Bitcoin Mixing… What is a Coin-Join transaction?

What is a coinjoin transaction?

Rick Messitt

Written By Rick Messitt: Content creator and Bitcoin educator at The Bitcoin Way.

In this Article we are going to talk about Bitcoin Mixing… What is a Coin-Join transaction?

If you’re interested in keeping your Bitcoin stack safe and keeping your finances private it can sometimes pay to mix things up a little to improve your privacy.

Keeping your wealth private significantly reduces the likelihood that you will be parted from it. That’s why we want to give you a gentle introduction into the concept of Bitcoin Mixing; an effective method of transacting in Bitcoin that allows you to reclaim your privacy.

Read on if you’re serious about protecting your generational wealth.

What is Bitcoin Mixing?

Bitcoin mixing is the process of sending your Bitcoin via a transaction known as a ‘Coin-Join’. During this process your bitcoin is mixed up with the bitcoin of other users who also funding the same transaction. The idea is that by mixing your funds up with other users, it becomes harder to track them.

But what does this mean and why would you want to do it?

Well the basic underlying concept for a Coin-Join transaction is surprisingly easy to get to grips with. Time for a basic analogy:

Imagine you and 99 strangers each put a $20 bill into a raffle drum like the one below. The drum is then turned, and all the notes are jumbled. Finally the drum is opened again and each of the 100 people then take a $20 bill back out.

Everybody would still end up with $20, but tracking which bill was which would be extremely difficult. It’s almost certain that the $20 bill you hold afterward is not the same one you put into the raffle drum to begin with. Even if was, would you know it? If anybody watching was interested in tracking what happens to each individual $20 bill and where it went next, they would have a tricky job on their hands.

(It's not entirely dissimilar to when your government funds a foreign war and nobody can quite follow where the avalanche of money went)

Whilst the raffle drum is an overly simplified analogy to a very clever transaction method it does do a reasonable job of demonstrating in layman’s terms the concept that underpins Bitcoin mixing.

But why should you learn how to do it?

Bitcoin Coin-Join Transactions – Are They Worth Learning?

The reason Coin-Join transactions exist at all is to protect your forward-looking privacy. If you have received a bitcoin payment from someone or withdrawn your Bitcoin from a KYC exchange, then when you send it to cold storage you may be revealing information about your whole Bitcoin stack.

It’s not wise to leave anyone with a map to where you store your treasure.

If, however, you take the time to mix your coins first then any UTXOs associated with your identity can be anonymised by mixing them with other people’s. Like in the raffle tumbler example above, once mixed with other people’s UTXOs, knowing which belong to you afterwards becomes much harder. Once your fresh UTXOs come out of the ‘tumbler’ you can now safely store them knowing that nobody can really be sure they are yours.

A Coin-Join transaction won’t erase the fact that a KYC exchange knows how much BTC you bought with them, or that you withdrew it, and it doesn’t stop people who pay you in Bitcoin knowing how much they gave you. But if done correctly it can prevent them knowing what you do with that Bitcoin next, and which address you store it in.

Better still, if you combine learning how to mix your coins with learning other skills like acquiring Bitcoin without giving up KYC info, then you can start to get seriously adept at concealing and protecting your family’s wealth.

It’s clear then that Bitcoin mixing is an important weapon in your arsenal that can protect you from many a green-eyed monster that might have a covetous interest in how much Bitcoin you hold.

So, let’s go a little deeper than the raffle tumbler analogy and take a look at how Coin-Join transactions actually work.

Bitcoin Coin Joins - How do they work?

Hopefully we have piqued your interest enough to want to go a couple steps deeper in understanding what exactly is happening when you make a Coin-Join transaction.

What you can see in the image below is a group of random bitcoin users on the left sending funds via a single Coin-Join transaction. In this example the person in the image that isn’t anonymous represents you with your currently KYC‘d stack of Bitcoin:

You and other users send Bitcoin into a ‘mixer’ to perform the Coin-Join. Notice that each user can use different sized UTXOs as inputs to the transaction.

Where things start to get interesting is when you look at the outputs from the transaction. Despite the input UTXOs being different sizes, all the outputs are exactly the same. This design feature is essential for the transaction to give you privacy. If all the outputs are identical, it’s impossible to know which one belongs to which user.

Despite your input UTXO being known, if I wanted to track your ongoing activity, I wouldn’t know which one of the identical 0.5 UTXO outputs was yours and which one to follow. Any one of them could be you.

You just disappeared like a fish in a shoal.

Wait, What About My Change?

It's a neat trick, but you might be left thinking “But in that example my input was 0.78 BTC and I only got 0.5BTC as an anonymised output, where are the rest of my funds?”

Well, of course like any valid Bitcoin transaction the total outputs must match the total inputs. BTC can’t just disappear, it needs to be accounted for somewhere. So along with your new 0.5 ‘Anonymised Output’ you would rightly expect your 0.28 BTC in change.

And this is what happens.  Every user that is due change will receive the change they are owed as an additional non-anonymised output back from the Coin-Join.

If we take the user in the image below as an example, they had an input of 0.65BTC and will have received both an anonymised UTXO of 0.5BTC and also change of 0.15BTC:

(Please note this is a simplified example. The change wouldn’t be exactly 0.15 BTC as there would be miners’ fees and any fees charged by the mixing service deducted).

What’s important to note here is that any change you do receive from a Coin-Join Transaction has NOT been anonymised.

To understand why, consider that if I knew what your input UTXOs were, and I can see the size of the anonymised outputs then I can work out the amount of change you would be expecting from the transaction. Given that everyone’s inputs were different, the amount of change everyone receives will also be different. In contrast to the anonymised UTXOs that are all identical, the change amounts from the transaction are not, making it much easier to figure out which change belongs to which user.

The reason this is important to understand is because if you then go and consolidate your change with your ‘anonymous output’ you essentially undo all the anonymity you just gained. Consolidate them together again and anyone watching can be reasonably confident you would only add your change to your own anonymous output, so it’s likely that anonymous output belongs to you.

In fact, if you think more broadly than this single transaction, if you ever consolidate bitcoin that is connected to your identity with a private stack you should then no longer consider that stack to be completely private.

Are there Downsides? I heard mixed Bitcoin might get ‘black-listed’?

One thing about Coin-Join transactions you should be aware of is that when you perform a Coin-Join that whilst the outputs are anonymised, it will be publicly viewable on the blockchain that those anonymised outputs have gone through a mixing process.

Most sane individuals will recognise that simply doing a Coin-Join transaction is no proof that any nefarious activity has taken place and it’s totally reasonable that a law-abiding user may want to use mixing services to improve their privacy. However, it should go without saying that hackers and bad actors also make use of mixing services to try and stay private and hide their illicit activities.

It's worth mentioning because there are some bitcoiners who understandably see some risk associated with this. For example, Governments around the world might enforce rules that prevent exchanges from allowing you to send mixed funds to them. Or perhaps mixed funds won’t be able to be used for certain purchases like property because you can’t prove your source of funds.

These concerns are understandable as the world around us has been designed to strip you of your privacy and Governments aren’t keen on allowing you to have any. It is totally plausible that they will attempt to curtail this behaviour via various draconian legislative actions.

Here at The Bitcoin Way, we acknowledge these concerns, but we also put tremendous value on privacy. It is essential in making sure your Bitcoin remains as safe as possible from both corrupt Governments and other bad actors. We feel that whilst Governments may try to fight privacy in Bitcoin, that it is ultimately a fight they will lose. As Bitcoin adoption grows it will result in the power of Governments worldwide being severely curtailed. As their power diminishes so will their ability to exert control over your private affairs.

If everyone decided to regularly Coin-Join their funds, then would then Government end up banning all of the Bitcoin? We have seen Governments try to ban Bitcoin before. It didn’t go so well for them.

Which Tools Can I Use for Coin-Join Transactions?

There are a lot of mixing services available, and it would be a mammoth task to take you through the pros and cons of each so instead we want to share with you some criteria you might consider when assessing which mixing services appeal to you most.

For example, some mixing services will require you to give control of your Bitcoin to them whilst they perform the Coin-Join whilst others are non-custodial keeping you in full control of your funds. In our opinion the latter is a far more sensible approach.

The Coin-Join software named ‘Whirlpool’, created by the developers of Samourai Wallet is non-custodial by design. This makes their mixing service attractive as it’s never a good idea to trust a 3rd party with custody of your Bitcoin.

You can access Samourai’s whirlpool service directly via the Samourai Bitcoin wallet or another popular and reputable wallet known as Sparrow.

In contrast, other popular mixing services that you come across might be more centralised and require you to give up control over your Bitcoin, making them a temporary custodian of your funds during the mixing process. Shown below is a snippet from the T’s and C’s of another popular mixing service called UniJoin:

You may find that the centralised services you come across are easier to use and a bit faster but is this convenience really worth giving up temporary control over your Bitcoin? We don’t think so and would urge you to spend time learning how to use non-custodial options instead.

This choice between custodial vs non-custodial mixers also isn’t the only consideration you should make. You should take your time and research mixing services very thoroughly before proceeding.

Ultimately you need to carefully assess which tools and services you use before taking the plunge with any sizeable amounts of your Bitcoin stack. Move slowly and carefully.

Start Your Training

Hopefully this brief introduction to Coin-Joins has helped you understand what they are, why they are useful, and you have a clearer idea of how they work.

Mixing your Bitcoin is a powerful tool to improve your privacy and the benefits are obvious. But for the less technically minded bitcoiners, knowing which services to use and how to do all of this safely can feel a little intimidating at first.

That’s why if you want to get serious about managing your wealth privately now and in the future, it makes sense to hire a dedicated coach to make sure you master these skills. Protecting and growing your wealth has never been so accessible, but it does require you to develop new skills.

We’re here to help you master them.

Disclaimer: Please note, The Bitcoin Way does not provide financial, legal, or tax advice. This article is for educational purposes only and is intended to offer insights into the technical aspects of Bitcoin management. Always consult with a professional advisor for advice specific to your situation.

Master Bitcoin security

Learn from our 25 years of cybersecurity expertise

Book a free consultation