As bitcoin evolves and grows through mainstream adoption, privacy will become increasingly important to keep you and your bitcoin safe from online and offline attacks.
CoinJoining is one of the best ways to protect your privacy and ensure that no one can link particular Bitcoin addresses to your identity. It’s one of many best things you can do to ensure that your bitcoin is safe for a lifetime without any bothering from bad actors.
Let’s dive right in and show you how to CoinJoin using Sparrow Wallet.
Understanding CoinJoin
CoinJoin ensures your bitcoin remains private using a technique that joins multiple UTXOs (inputs) together and spends them with other users’ transactions, making it more difficult to know which addresses belong to someone (outputs).
CoinJoin help to improve the privacy of bitcoin by making it more difficult for potential attackers to determine which Bitcoin addresses have true ownership over the bitcoin being traced on the ledger, making it essential for some bitcoiners to retain their financial sovereignty.
Considerations Before You CoinJoin
Be sure to read up on the basics of CoinJoin if this is a new concept for you as it may save you from making any mistakes from diving in too quickly. If you’re comfortable with learning new Bitcoin tools, however, then CoinJoining should come fairly intuitively.
Importantly, you need to run your own node and connect to it before CoinJoining so that transactions are only visible to you.
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.
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 or create a burner wallet. After doing so, you can import the new wallet into Sparrow Wallet.
How To CoinJoin With Sparrow Wallet
To get started, you’ll first need to install Sparrow Wallet onto your computer. MacOS, Windows, and Linux all support Sparrow Wallet, so most desktop users shouldn’t have any compatibility issues.
Go to Sparrow’s home page and click one of the “Download” buttons at either side of the page.
Verifying Your Download
Before downloading Sparrow, you can also install GPG Suite to verify that you’re downloading a safe version of Sparrow.
Sparrow’s Download page contains instructions to verify the download for each operating system, so follow the instructions according to the operating system you’re on.
1. Fund Sparrow Wallet
You can choose to create a brand new desktop wallet to use on Sparrow, or you can import an existing wallet of your choice. Either way, all that CoinJoining requires is a funded wallet with UTXOs to mix.
For the sake of this tutorial, I went ahead and created a desktop wallet. I called it “CoinJoin Wallet”.
Next, I’ll take a look at the “Addresses” tab and label my wallet’s first two receive addresses “Whirlpool 1” and “Whirlpool 2”.
I always recommend labeling each new receive address from Sparrow as it will help you keep the sources or purpose of all your UTXOs organized.
From here, I’ll paste each address into another Bitcoin wallet of mine to receive bitcoin with.
I sent two transactions totaling over 200,000 satoshis, made up of two UTXOs worth slightly over 100,000 sats each.
2. Select UTXOs For Mixing
Then, from the “UTXOs” tab, you will have to select the UTXOs that you want to CoinJoin. Since I only have two UTXOs, I’ll just select both of them.
After selecting the UTXOs, click “Mix Selected” at the bottom right of Sparrow.
3. Whirlpool Configuration
A pop up should appear to configure your Whirlpool. The first pop up will ask for you to enter your Samourai SCODE in case you have one, which reduces the cost of mixing.
I don’t have an SCODE, so I’ll just leave it blank.
You’ll also notice the Premix fee rate, which is the fee rate of the transaction to enter the CoinJoin (known as Tx0). I’ll leave it set to the normal 36 sat/vb (sat/vB range may vary depending on network congestion), however, you can adjust the Premix Priority slider higher or lower depending on how urgent your CoinJoin is.
Next, the software should automatically select the pool configuration based on the amount of sats you’re mixing in Sparrow, but you can manually select if it doesn’t for you.
If you’re using 100,000 – 1 million sats, the 100,000 sat pool is for you.
For more than 1 million sats, go with the 1 million sat pool.
More than 10 million sats, then use the 10 million sat pool.
And so on…
Keep in mind that 100,000 sats is the minimum threshold amount for CoinJoining with Sparrow.
You’ll also be shown your:
- Anonset, which shows you how many other Bitcoin transactions your’s will be grouped with.
- Pool fee, which covers the operational cost of the Whirlpool.
- Premix outputs, which show you how many UTXOs you’ll have waiting to enter a CoinJoin pool. Despite selecting two > 100,000 sat UTXOs to mix, I only have one Premix output here because my total CoinJoin will be less than 200,000 sats after accounting for fees. So, it will only create one 100,000 sat premix, while creating “Badbank change” with the remaining ~ 80,000 sats after fees.
Once you’re done there, just click “Preview Premix”!
4. Finalize Premix Transaction
Sparrow will put together the transaction for you, where you can then verify the details to ensure everything looks good.
Let’s take a look at the structure of the CoinJoin transaction that Sparrow shows us.
On the left side you can see the two input transactions: Whirlpool 1 and Whirlpool 2.
On the right, we have a few different things:
- A Whirlpool fee that Samourai collects for providing the service.
- Badbank Change, or “doxxic change”, that you need to spend carefully as it implicates your bitcoin’s privacy (more on that later).
- A single “Premix #0” which contains one 100,000 sat Premix UTXO (starting from #0) that will get sent through the Whirlpool with other Bitcoin users’ UTXOs.
- A final transaction fee that Bitcoin miners collect for adding the transaction to a block.
Once you’re ready and everything looks good, click the blue “Broadcast Premix Transaction” button at the bottom right.
5. CoinJoin Your Bitcoin
You’ll notice four tabs appear on the left side of Sparrow: Deposit, Premix, Postmix, and Badbank.
The first thing we’ll do is head to the Premix UTXOs tab.
You’ll notice the one ~100,000 sat UTXO waiting to enter the Whirlpool here. Since the transaction just went through, it’s unconfirmed.
Meanwhile, if you take a look at the Postmix UTXOs tab, you’ll see that there are currently no UTXOs there, because our Premix UTXO has yet to enter the CoinJoin pool.
Finally, if we take note of the Badbank tab, we can see that it contains the remaining sats that were leftover after fees.
Premix
Once your transaction confirms, it should automatically be queued to enter a CoinJoin pool.
You’ll notice at the bottom left is a “Stop Mixing” button. If your transaction isn’t mixing, this will say “Start Mixing.” So if your transaction doesn’t automatically enter the queue after confirming, ensure that you’ve clicked this button to start the mixing process.
Since you have to pay a fee for your first mix, your UTXO should enter the pool faster. And the good news is: Remixing is free! However, remixing a second, third, or more times could take longer since now, someone else is paying the fee.
CoinJoining is more or less a randomized, lottery-based system for selecting UTXOs, so you’ll have to wait for someone else to pay that fee for your remixes to enter the pool.
Postmix
After your Premix UTXO successfully mixes for the first time, you should see it arrive in your Postmix UTXOs tab.
You can see that it’s been mixed 1 time, and is unconfirmed since Bitcoin miners have yet to add it to the next block. To the right of that unconfirmed notice, you’ll see the transaction ID, as well as a number zero. This zero tells me that my UTXO was the first output (starting from #0) in the mix.
Let’s take a look at this on-chain with mempool.space to get a better idea of what this looks like.
Here, you can see my Premix UTXO of 109,680 sats on the left, batched together with other Bitcoin users’ transactions, and my Postmix UTXO of a clean 100,000 sats on the right. Since I was output #0, my transaction was the first output from the mix.
And…that’s it!
You’ve successfully completed your first CoinJoin with Sparrow Wallet!
From here, you have a couple of options:
- Leave CoinJoin running to keep your Postmix UTXO queued for more mixes. If you simply leave the program running, it will keep mixing your bitcoin until you decide to stop.
- Spend your CoinJoined bitcoin as you please.
- Mix your bitcoin to cold storage or elsewhere to keep it safe.
Let’s take a look into the second and third options here.
6. Spend Or Send Your Mixed Bitcoin
Once you’ve CoinJoined your bitcoin to your liking and are ready to move it, you can either send it straight from Sparrow as normal to an anonymous spending wallet, or you can take advantage of Sparrow’s “Mix to” feature.
“Mix to” automatically mixes and sends bitcoin wherever you’d like it to after mixing so that you don’t have to manually send it afterwards. Whether that’s a PayNym, a cold storage address, or anywhere else, just don’t mix to a KYC’d source – unless you’re looking to undo all of the work you just went through in this tutorial.
Wherever you mix to, the Bitcoin wallet needs to be connected or imported into Sparrow.
For example, if I wanted to mix my Postmix UTXO to a PayNym I had connected to Sparrow, I’d simply click “Mix to…” at the bottom left of Sparrow in my Postmix UTXOs tab and select the PayNym wallet:
Check over these settings to ensure everything is set to your specifications:
- Mix to wallet: I have set to PayNym since that’s the wallet I’ve created on Sparrow
- Minimum mixes: Automatically set to three, which I’ll keep there as it offers a good base level of privacy.
- Index range: You can adjust this if you’d like to mix the same wallet simultaneously on multiple clients. For a standard CoinJoin like ours, I’ll leave it set to “Full”. However, you should select “Even” to mix on the Samourai mobile app simultaneously, or “Odd” to mix on Samourai CLI/GUI simultaneously.
Once you’re done, hit “Apply” and let the software do the rest of the work!
All that’s left at this point is your Badbank change. You’ll have to spend this carefully, so be sure to check out the seven ways we’ve recommended to spend your CoinJoin change in a safe and private manner.
Remember These CoinJoin Tips
Remember, bitcoin is here to help keep you and your financial life private. If you take the time here to CoinJoin your bitcoin but fail to maintain any other privacy standards for your Bitcoin stack, then you’ll quickly find yourself facing the issues that CoinJoining was designed to avoid.
- While even a single CoinJoin can help improve your privacy, mix your bitcoin multiple times, perhaps two to three times, before spending it to ensure a great baseline level of privacy.
- Use reputable services. I cannot stress this enough. If you want to look elsewhere besides Sparrow to CoinJoin your bitcoin, do everything you can to ensure that you won’t be misplacing your bitcoin with bad actors.
- Never mix KYC and non-KYC UTXOs together as that will compromise the privacy of your non-KYC bitcoin as well as any direct transactions taking place to and from that wallet.
- Never mix your doxxic change outputs with your Postmix UTXOs as it also undermines your privacy measures. Thankfully, Samourai Wallet makes it nearly impossible to do, but just understand how intentional you must be with your doxxic change outputs.
- Ensure the Bitcoin addresses you’re using with CoinJoin are also private and unlinked to your identity.
- Practice proper coin control with your CoinJoined bitcoin and in general to keep your privacy foundation solid for all future Bitcoin activity.
Final Thoughts
Now that you have a full overview of how to CoinJoin with Sparrow Wallet, you should feel better equipped to take advantage of all the privacy tools bitcoin has to offer you, such as UTXO consolidation.
Don’t just stop with CoinJoining when it comes to your bitcoin’s privacy! There’s plenty of things you can do today to better optimize for bitcoin’s future, so ensure that all of your bases are
covered and you’ve walked through all of the necessary steps to hyperbitcoinization yourself.
Thank You For Reading
If you found this article helpful, please consider sharing it, supporting one of these affiliates, or making a value for value donation so that we can continue to publish more Bitcoin-only content.