{"id":12699,"date":"2021-12-07T01:00:00","date_gmt":"2021-12-07T01:00:00","guid":{"rendered":"http:\/\/ci029414f570002594"},"modified":"2025-01-29T13:36:03","modified_gmt":"2025-01-29T13:36:03","slug":"a-comprehensive-bitcoin-coinjoin-guide","status":"publish","type":"post","link":"https:\/\/bitcoinmagazine.com\/technical\/a-comprehensive-bitcoin-coinjoin-guide","title":{"rendered":"A Comprehensive Bitcoin CoinJoin Guide"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><h2>Preliminaries<\/h2>\n<p>To understand CoinJoin, it would help to understand UTXOs (unspent transaction outputs) and Bitcoin transactions. You can skip this section if you know enough about these, but it may be valuable to read it anyway.<\/p>\n<h2>Bitcoin Transactions<\/h2>\n<p>In simple terms, a Bitcoin transaction is made up of inputs and outputs (containing bitcoin amounts) and a digital signature(s) made with a private key.<\/p>\n<p>A good analogy is a bank check, which contains<\/p>\n<ul>\n<li>Which account the money is coming from<\/li>\n<li>Who is getting paid<\/li>\n<li>The amount<\/li>\n<li>And a signature<\/li>\n<\/ul>\n<p>Here is a random Bitcoin transaction I copied from the Bitcoin blockchain using the publicly available Bitcoin node <a href=\"https:\/\/mempool.space\/\" target=\"_blank\" rel=\"noopener\">https:\/\/mempool.space\/<\/a> (Sorry if this transaction is yours!):<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/53_image6.png\" title=\"\"><\/figure>\n<p>On the left column, five bitcoin amounts were entered as inputs, and they were spent to two different outputs on the right (The total of the amounts on the left nearly equal the amounts on the right; the small difference is collected by the miner of the block).<\/p>\n<p>On the bottom left, the mining fee is calculated: 81,200 sats or 100 sats per byte (of interest, this was an outrageously high and unnecessary fee to offer given the waiting list was not particularly long at the time).<\/p>\n<p>The signature details are not shown, but every node does check that the signatures are valid.<\/p>\n<h2>UTXO<\/h2>\n<p>\u201cUTXO\u201d is a horrible, horrible name. While it accurately describes what it is, and it\u2019s understandable by an experienced Bitcoiner, it is complete gobbledygook for someone new. It would be better if it was called \u201cReceived Coin\u201d or something similar. Just from my pointing this out, you might already understand what it is.<\/p>\n<p>Even though bitcoins are divisible, think of bitcoin amounts not like a dividable liquid, but of discrete amounts, like coins in a purse. I like to use Bitcoin\u2019s competitor, gold, as an example:<\/p>\n<p>Imagine you received a gold coin weighing 1.2 ounces. And now you want to pay someone 0.2 ounces. You\u2019d have to melt the 1.2 ounce coin and make two coins, one weighing 0.2 ounces for the payment, and the rest as a 1.0-ounce coin for you to keep.<\/p>\n<p>Bitcoin is similar. When you receive 1.2 bitcoin to your wallet, you have a discrete 1.2 bitcoin \u201creceived coin\u201d or UTXO. If you wanted to spend 0.2 of that, you can\u2019t break off a piece of it and spend only that; you have to \u201cmelt\u201d the entire 1.2 bitcoin amount first by putting it into a transaction. With the transaction, you can divide it up however you want, and send it to as many different addresses as you want, including back to one of your own addresses.<\/p>\n<p>This is where the concept of \u201cchange\u201d comes in. To spend 0.2 bitcoin, you take the 1.2 bitcoin as an input to the transaction, and make two outputs; one as payment (0.2 bitcoin), and another (1.0 bitcoin) as change back to you (to one of your own addresses). It would look like this:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/34_image8.png\" title=\"\"><\/figure>\n<p>Alice\u2019s 1.2 bitcoin sitting in one of her wallets\u2019 addresses has been split into two. The Lambo dealer\u2019s wallet address has received 0.2 bitcoin, and a different address in Alice\u2019s wallet receives 1.0 bitcoin.<\/p>\n<p>One final example \u2013 imagine you have the following UTXOs in your wallet, and you need to pay 0.6 bitcoin to someone:<\/p>\n<ul>\n<li>0.2 bitcoin<\/li>\n<li>0.5 bitcoin<\/li>\n<li>0.002 bitcoin<\/li>\n<\/ul>\n<p>Your transaction would take the 0.2 and 0.5 bitcoin UTXOs and put them into a transaction (and leave the 0.002 bitcoin UTXO alone). The transaction would have two outputs: 0.6 bitcoin as the payment, and 0.1 bitcoin as change. After the transaction, your wallet will have a 0.002 bitcoin UTXO and the 0.1 bitcoin UTXO. Two \u201ccoins\u201d in total, with a total balance of 0.102 bitcoin (ignoring mining fees to keep it simple).<\/p>\n<h2>What Is A CoinJoin?<\/h2>\n<p>Many people do not realise that a single transaction can contain digital signatures by more than one person. Without this ability, CoinJoins are not possible.<\/p>\n<p>A CoinJoin is when two or more people combine their transactions into one transaction, in such a way that it is unclear who owns which coin after the transaction. The ambiguity is created by matching the size of the inputs or the outputs, as shall be seen in the example below.<\/p>\n<p>It is possible for an outsider to track coins as they get spent, to an individual person (whether or not that person\u2019s true identity is known). For example, a coin can be moved from address A, to address B, to address C, and it may be possible to determine that the coins in address C belong to whoever owned Address A. This is the pseudonymous property of Bitcoin. However, because customers of exchanges are forced to submit identification documents (Know Your Customer laws, or \u201cKYC\u201d), then because coins withdrawn from the exchange and sent to address A have a real identity associated with it to certain surveillance companies, they therefore know the identity of who owns address C in the example above. It\u2019s important to appreciate that there is no identification on the blockchain; the true identity information is external to Bitcoin. Only people with access to the exchange\u2019s KYC data can correctly identify who owns a coin. Who are they? They\u2019d be either the exchange, surveillance companies the data is sold to, governments, or hackers.<\/p>\n<p>CoinJoining breaks the Address A to B to C pseudonymous identification link, as I\u2019ll show. As I mentioned, this is achieved by using identical values of UTXOs. For example, here is a CoinJoin:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/12_image13.png\" title=\"\"><\/figure>\n<p>On the left, there are two inputs to this transaction that belong to two different people, Alice and Bob. Only the people with access to KYC data know that it\u2019s Alice and Bob\u2019s. To everyone else, it\u2019s Person A and Person B.<\/p>\n<p>Two 1.0 bitcoin UTXOs have been created and it is unclear which belongs to Alice (Person A) and which belongs to Bob (Person B). Each has a 50% chance of belonging to Alice, and 50% to Bob. The owner of the 0.2 and 0.5 bitcoin amounts can be deduced quite easily with mathematical logic.<\/p>\n<p>Focusing on Alice, she has received 1.0 bitcoin into one of her wallets\u2019 addresses. It is not completely private; to an outside observer, that 1.0 bitcoin has a 50% chance of belonging to her. To increase her privacy, those coins can be mixed again, but she should mix with someone else, not with Bob.<\/p>\n<h2>What Can CoinJoin Do For You?<\/h2>\n<p><strong>Hiding your bitcoin from the government?<\/strong>&nbsp;<\/p>\n<p>CoinJoining does not hide the size of your KYC (Know Your Customer) bitcoin stack from the government. If you have KYC coins, that means you submitted your ID to an exchange and bought bitcoin with that account. You should assume that the exchange will divulge all your transactions and withdrawals to the government if requested.<\/p>\n<p>So if you purchased 1 bitcoin and withdrew that to your own wallet and then CoinJoined it, it may be impossible for the government to know what address(s) your bitcoin is in, but they still know you own 1 bitcoin. If you sold it, it presumably is the law to report the sale. If they ever pass laws to confiscate bitcoin or to tax unrealised gains, they can know exactly how much you have.<\/p>\n<p><strong>Boating Accident<\/strong><\/p>\n<p>If you claim to not own bitcoin because you lost it all in a boating accident, the coins that are known to be yours before your accident will have to sit there and never move. Once you spend, your tragic boating accident will be revealed as a fraud. For completeness, I\u2019ll say that having mixed your coins prior to the accident helps, but not something I\u2019m advocating. It\u2019s a dangerous strategy.<\/p>\n<p><strong>Spending Privacy<\/strong><\/p>\n<p>What it can do though, is when you spend bitcoin, the recipient will not have a record of where that payment came from. I\u2019ll explain. Suppose you have 10 bitcoin in an address, and you use it to pay someone 0.001 bitcoin. The recipient can look up the blockchain and notice that it came from an address holding 10 bitcoins. However, if you mixed your coins, the payment will come from an address holding a much smaller amount, and the history of that smaller amount is unknowable too. This means that all of your other coins will not be revealed. Privacy.<\/p>\n<p><strong>Should you do it?<\/strong><\/p>\n<p>So if you understand that you can\u2019t hide your bitcoin total from the government, and you don\u2019t plan to have a boating accident, and all you want is spending privacy, should you CoinJoin?<\/p>\n<p>Think about this question as you read on, and, know that spending using the Lightning Network is going to be sufficiently private for nearly everyone.<\/p>\n<p>Having said that, if everyone CoinJoined, or if CoinJoining was a default implementation in wallets, privacy is enhanced for everyone even if they don\u2019t attempt it.<\/p>\n<p><strong>Is It Wrong? Is It Illegal? What Are The Risks?<\/strong><\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/113_image3.png\" title=\"\"><\/figure>\n<p>Some people are concerned that one day, mixed bitcoins will be labeled as \u201ctainted\u201d and therefore not accepted on exchanges. That might be true, but it is also an easy problem to circumnavigate. You can simply use the coins to open Lightning channels, and anyone receiving Lightning transactions has no way of knowing the channel was opened with mixed coins.<\/p>\n<p>In addition, you can mix a portion of your coins instead of all of them, to hedge your bets.<\/p>\n<h2>How To CoinJoin? Option 1 \u2013 Automated Services<\/h2>\n<p>There are services available where you submit your coins to a pool for mixing. For example, Samourai\u2019s Whirlpool, Wasabi, or JoinMarket. Each has advantages and disadvantages.<\/p>\n<p><strong>Whirlpool and Wasabi<\/strong><\/p>\n<p>Both Samourai and Wasabi take a variable fee for offering an automated mixing service. You leave your software running, and the central coordinating program will mix your coins with other paying customers. Price varies depending on mixing settings, but it costs roughly 0.2% of the amount you want to mix, including the service fee and mining fees.<\/p>\n<p><strong>JoinMarket<\/strong><\/p>\n<p>JoinMarket is different. There is still an automated service, however, users\u2019 coins enter mixes based on a free market. Users can either offer their coins for mixing (market \u201cmakers\u201d) with others and can earn a fee. Or users can pay these makers to mix their coins with them (\u201ctakers\u201d).<\/p>\n<p>As a maker, you need to leave your coins on a hot wallet on a computer, and wait for people to accept your offer, competing with other makers on price and size \u2013 it is not certain that your coins will be mixed, or when. There is also a risk of keeping your coins in a hot wallet rather than in cold storage. You are rewarded for this risk by being paid the fee you set (in bitcoin) if your coins are mixed.<\/p>\n<p>As a \u201ctaker\u201d although you pay a fee, your coin enters a mix essentially immediately. The time it takes to do one mix depends on when the next Bitcoin block is found by a miner. Overall using JoinMarket sounds interesting and fun to do, however, it is quite a technical challenge to pull it off successfully. It is not ready for the mainstream market. Those with some Linux command line experience at the very least would be able to tackle this.<\/p>\n<p>As I do not generally recommend automated mixing services due to a lack of control over external parameters, I have not made a guide. A little internet search should be fruitful though.<\/p>\n<h2>How To CoinJoin? Option 2 \u2013 DIY CoinJoin<\/h2>\n<p>Generating your own CoinJoin transactions has the advantage of total control, and it saves costs; however, it requires you to coordinate transactions with other people which potentially limits the volume of CoinJoins you can do. It also requires some knowledge about generating CoinJoin transactions, and fully controlling transactions generally.<\/p>\n<p>Also, it\u2019s helpful to have a good understanding of transaction privacy, otherwise, you might inadvertently make an error and undo all your effort.<\/p>\n<p>The biggest advantage I find is exploring the fascinating possibilities. I will explain how to do this, but a prerequisite is to know how to use Electrum Desktop Wallet. <a href=\"https:\/\/armantheparman.com\/using-electrum-desktop-wallet\/\" target=\"_blank\" rel=\"noopener\">You can learn here.<\/a><\/p>\n<p><strong>Step 1: Run A Node<\/strong><\/p>\n<p>It\u2019s important to run your own node. If you don\u2019t, the coins you mix and send to your wallet are no longer private. This is true whether you use an automated mixing service or not. Why? Because without a node your wallet is providing its addresses and IP address to a random node which could be a surveillance company.<\/p>\n<p>There are many good reasons to run a node (<a href=\"https:\/\/bitcoinmagazine.com\/culture\/six-reasons-you-should-run-bitcoin-node\">I explain six reasons here<\/a>). I recommend running the MyNode package for beginners (<a href=\"https:\/\/armantheparman.com\/mynode-bitcoin-node-easy-setup-guide-raspberry-pi\/\" target=\"_blank\" rel=\"noopener\">see my MyNode guide<\/a>). Alternatively, if you have some experience, the fully open-source RaspiBlitz is excellent (<a href=\"https:\/\/armantheparman.com\/raspiblitz\/\" target=\"_blank\" rel=\"noopener\">my RaspiBlitz guide<\/a>).<\/p>\n<p><strong>Step 2: Create A Private Wallet<\/strong><\/p>\n<p>You may already have a wallet, but as I mentioned, if it has ever connected to a public node, the addresses in that wallet are not private (even the empty unused ones), so sending private coins there damages privacy.<\/p>\n<p>If you make a new private key using a hardware wallet, make sure it never connects to the hardware wallet\u2019s software\/node. For the commonly used Ledger, this is almost impossible. You need to create a seed BEFORE connecting to Ledger Live. Once you connect, Ledger Live potentially records all your addresses and your IP address. But don\u2019t worry, once you do that, you can create a new wallet using the same seed: just add a passphrase, and that particular wallet will be private. The wallet without the passphrase can be discarded, or never used. (I provide much more detail about correct hardware wallet usage <a href=\"https:\/\/armantheparman.com\/using-hwws\/\" target=\"_blank\" rel=\"noopener\">here.)<\/a> <\/p>\n<p>For the Coldcard hardware wallet, this is not a problem, as it never requires you to connect to their software.<\/p>\n<p>If you want to be a purist, create <a href=\"https:\/\/bitcoinmagazine.com\/culture\/diy-bitcoin-private-key-project\">your own seed using dice or coin flips<\/a> and calculate the seed using <a href=\"https:\/\/armantheparman.com\/how-to-set-up-a-raspberry-pi-zero-air-gapped-with-electrum-desktop-wallet\/\" target=\"_blank\" rel=\"noopener\">an air-gapped computer<\/a>. It\u2019s really fun and you can learn a lot about Bitcoin security.<\/p>\n<p><strong>Step 3: Find Someone Who Wants To CoinJoin With You<\/strong><\/p>\n<p>This can be tricky. Contact me, I\u2019m always up for a CoinJoin. As your circle of Bitcoin friends widens, and your skills improve (and theirs) more opportunities will present themselves.<\/p>\n<p><strong>Step 4: Construct A CoinJoin Plan<\/strong><\/p>\n<p>Decide on:<\/p>\n<ul>\n<li>Which UTXO you will use<\/li>\n<li>What address it will go to<\/li>\n<li>The size of the mixed coin<\/li>\n<li>Will there be any change<\/li>\n<li>Where will the change go<\/li>\n<li>What mining fee to pay<\/li>\n<\/ul>\n<p>For example, I will take a UTXO of 0.01724084 bitcoin, and spend it as two coins; one as a mixed coin of 0.01 bitcoin, and the other as the change of 0.00724084 bitcoin (the change will actually be a little smaller to pay the mining fee as well).<\/p>\n<p>I\u2019ll then need to plan for my CoinJoin partner to spend a UTXO and create an identical 0.01 bitcoin mixed output. There is nothing special about this output on its own. The only reason it is mixed is because it is identical in size to my 0.01 bitcoin output.<\/p>\n<p>My transaction:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/16_image12.png\" title=\"\"><\/figure>\n<p>Partner\u2019s Transaction:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/8_image18.png\" title=\"\"><\/figure>\n<p>Combined Transaction:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/18_image10.png\" title=\"\"><\/figure>\n<p><strong>Step 5: Generate Your Transaction And Save It<\/strong><\/p>\n<p>In Electrum, select the UTXO you want to mix. Find it in the address or coins tab and right-click it, and choose &lt;Spend from&gt;:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/17_image11.png\" title=\"\"><\/figure>\n<p>Then head over to the &lt;Send&gt; tab, and paste in the address where you want to send the mixed coin to:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/10_image15.png\" title=\"\"><\/figure>\n<p>Click &lt;Pay&gt; and then &lt;Advanced&gt;<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/9_image14.png\" title=\"\"><\/figure>\n<p>Choose your mining fee, then click &lt;Finalize&gt;.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/26_image9.png\" title=\"\"><\/figure>\n<p><em>Ignore the high fee ratio warning: Electrum is getting confused because the transfer is internal. It thinks the payment is tiny due to a coding oversight by the developer.<\/em><\/p>\n<p>The &lt;Finalize&gt; button changes to &lt;Export&gt;; click it and save the transaction to a file. If you are using a hardware wallet, you\u2019ll normally need to select an option specifically for hardware wallets:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/85_image4.png\" title=\"\"><\/figure>\n<p>Notice in the image above it says \u201cinclude xpubs.\u201d Since we are going to be sharing this unsigned transaction with another person we may not necessarily completely trust, we don\u2019t want to provide that information. An xpub does not allow them to steal coins but it would allow them to see your entire wallet. There is a way around this, but I need to take you through a detour to demonstrate however &#8211;<\/p>\n<h2>Detour<\/h2>\n<p>The purpose of this detour away from \u201dHow To Make CoinJoins\u201d is to explain how to bypass the requirement to include xpubs in the saved transaction. You\u2019re either going to be signing CoinJoin transactions with a hardware wallet, or with a software wallet on a desktop computer that contains your private key.<\/p>\n<p><strong>Coldcard Hardware Wallet<\/strong><\/p>\n<p>The Coldcard by default checks that the addresses the coins are being spent from belong to the private key it holds. But remember, a CoinJoin transaction contains UTXO inputs from other peoples\u2019 wallets too.<\/p>\n<p>The way it checks is by requiring the xpubs to be part of the transaction you import to it, and then it can recognise if the addresses contained in the transaction belongs to itself or not.<\/p>\n<p>We need to change this default behaviour to do CoinJoins.<\/p>\n<p>After logging in, go to the &lt;settings&gt; menu, then &lt;multisig wallets&gt;, then &lt;trust PSBT?&gt;. Select \u201cOK\u201d after reading the message and select &lt;Trust PSBT&gt;. You can now sign CoinJoined transactions even if the xpubs for the CoinJoin partners were not supplied \u2013 just like a regular software wallet.<\/p>\n<p><strong>Other Hardware Wallets<\/strong><\/p>\n<p>I have tested the BitBox02 hardware wallet and could not see a similar option to \u201ctrust PSBT.\u201d I also tested a CoinJoin and it declined to sign due to an unrecognised input, i.e., it noticed the CoinJoin partner\u2019s input address did not belong to itself. So, I can\u2019t see a way to use the BitBox02 for CoinJoining.<\/p>\n<p>I have not yet tested other hardware wallets; you may wish to do this yourself.<\/p>\n<p><strong>Software Wallet Hop<\/strong><\/p>\n<p>An alternative is to create a temporary software wallet, and any UTXO destined for CoinJoin can first be sent from the hardware wallet to the software wallet. Then you use the software wallet to construct the CoinJoin. This way, you minimise the amount of bitcoin out of cold storage, but it does add an additional transaction cost.<\/p>\n<p><strong>Air-Gapped Software Wallet<\/strong><\/p>\n<p>My favorite way is to create your own hardware wallet with an air-gapped Raspberry Pi Zero running Electrum, which you can <a href=\"https:\/\/armantheparman.com\/how-to-set-up-a-raspberry-pi-zero-air-gapped-with-electrum-desktop-wallet\/\" target=\"_blank\" rel=\"noopener\">build yourself quite cheaply<\/a> by following my linked instructions. And then <a href=\"https:\/\/armantheparman.com\/psbt\/\" target=\"_blank\" rel=\"noopener\">these instructions will teach you how to do air-gapped spends<\/a> using QR codes. This is how you\u2019d <a href=\"https:\/\/bitcoinmagazine.com\/culture\/diy-bitcoin-private-key-project\">make a private key from scratch<\/a> using the device, instead of using a key created by a hardware wallet. You don\u2019t have to use a Pi Zero \u2013 you could build an air-gapped desktop computer part by part, making sure there are no Wi-Fi or Bluetooth components. It\u2019s much more pleasurable to use and faster, but also more expensive.<\/p>\n<h2>Detour Returns From \u201cHow to CoinJoin? Option 2 \u2013 DIY CoinJoin\u201d<\/h2>\n<p><strong>Continued \u2026 Step 5: Generate Your Transaction And Save It<\/strong><\/p>\n<p>You now know how to bypass the need to save xpubs in your exported transaction. Instead, you can save a transaction this way:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/41_image7.png\" title=\"\"><\/figure>\n<p><strong>Step 6: CoinJoin Parter Follows Step 5 As Well And Sends You Their UNSIGNED Transaction<\/strong><\/p>\n<p>After your CoinJoin partner saves his\/her transaction to a file, it needs to be sent to whoever is coordinating the CoinJoin. Given that the transaction is going to be published on the public blockchain, the information being sent is not particularly sensitive. But it is still desirable to not divulge your actions to anyone performing internet surveillance.<\/p>\n<p>An easy way to communicate is by using ProtonMail. If both sender and recipient use the service, then messages are encrypted by default. If one user is not using ProtonMail then the message is not encrypted.<\/p>\n<p>A more cumbersome way, but far more interesting (which I wholeheartedly encourage you to learn) is to use public\/private key cryptography to encrypt the data yourself and send it across any insecure transmission medium, such as Gmail. <a href=\"https:\/\/armantheparman.com\/privatemessages\/\" target=\"_blank\" rel=\"noopener\">Here is a guide I wrote on this.<\/a><\/p>\n<p><strong>Step 7: Merging Transactions Into A CoinJoin Transaction With Electrum<\/strong><\/p>\n<p>Once you receive all the unsigned transactions from one or more of the CoinJoin partners, you should save them to your computer, and start by opening your transaction in Electrum like this:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/223_image1.png\" title=\"\"><\/figure>\n<p>Then, near the bottom right side of the transaction window, you\u2019ll see a &lt;Combine&gt; button. Click that, and then &lt;Join inputs\/outputs&gt;.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/10_image16.png\" title=\"\"><\/figure>\n<p>There are multiple ways to input the transaction data to Electrum, but just clicking the folder icon to give it a file is the easiest.<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/7_image17.png\" title=\"\"><\/figure>\n<p>After &lt;Load transaction&gt; you\u2019ll see the combined transaction:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/72_image5.png\" title=\"\"><\/figure>\n<p>Some things about this transaction are worth noting. The highlighted addresses indicate that Electrum recognises the addresses as belonging to itself. Green are receiving addresses, yellow are change addresses.<\/p>\n<p>The transaction has two inputs, one of them recognised as self (green), and four outputs, one of which is to a green (self) receiving address, and another a yellow change address. There is one unhighlighted input that belongs to the CoinJoin partner. There are two unhighlighted outputs that also belong to the CoinJoin partner, one of them is his\/her CoinJoin UTXO and the other is change.<\/p>\n<p>Notice in the output window there are two identical amounts of 0.01 bitcoin. One is highlighted as our own, but when viewed on the blockchain, no one will know which of the two belongs to this wallet.<\/p>\n<p><strong>Step 8: Signing<\/strong><\/p>\n<p>So far so good, but we\u2019re not finished.<\/p>\n<p>The transaction now needs to be signed by each CoinJoin partner. Only when all parties have signed is the transaction valid and can be broadcast. Whoever is the final signer has a certain amount of \u201cpower\u201d as they can hold up the transaction. You can decide amongst yourselves who will be last to sign and broadcast.<\/p>\n<p>Let\u2019s say you will be the last to sign. Then you\u2019d export this merged transaction to file, and send it to the CoinJoin partner. They need to load the transaction:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/223_image1.png\" title=\"\"><\/figure>\n<p>Then sign:<\/p>\n<figure><img decoding=\"async\" src=\"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2025\/01\/26_image9.png\" title=\"\"><\/figure>\n<p>After signing, export to file, and send back to you. If there are many CoinJoin partners, then each person must sign and send it to the next person for signing.<\/p>\n<p>When it comes back to you, you load the transaction, sign it, then click the &lt;Broadcast&gt; button which is to the right of the &lt;Sign&gt; button.<\/p>\n<h2>Congratulations!<\/h2>\n<p>Well done! How cool was that? Now do it again.<\/p>\n<h2>What Now?<\/h2>\n<p>If you\u2019ve got a sufficient number of mixed UTXOs, it\u2019s important to know what to do with them:<\/p>\n<p>#1 Never sell for fiat, obviously.<\/p>\n<p>#2 Never merge them with a KYC coin as that undoes the privacy of the mixed coin.<\/p>\n<p>#3 Avoid merging different mixed coins together if you can help it.<\/p>\n<p>#4 Note that the change UTXOs are not private and are still KYC\u2019d coins.<\/p>\n<p>#5 Mixed coins are the coins you can privately spend. Make sure you understand exactly which coins you are spending, and don\u2019t accidentally introduce KYC coins into the input (which merges them). Learning to use a powerful Bitcoin wallet, such as Electrum, helps.<\/p>\n<p><em>This is a guest post by Arman the Parman. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or <\/em>Bitcoin Magazine<em>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Everything you need to know about utilizing CoinJoin in your bitcoin transactions.<\/p>\n","protected":false},"author":2824,"featured_media":5744,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[291,2622,1831,742,708,2381],"class_list":["post-12699","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technical","tag-coinjoin","tag-joinmarket","tag-martys-bent","tag-mixing","tag-transactions","tag-utxo"],"author_data":{"id":2824,"name":"Arman The Parman","nicename":"arman-the-parman","avatar_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/12\/atp2-96x96.png"},"featured_image_url":"https:\/\/bitcoinmagazine.com\/wp-content\/uploads\/2024\/11\/knapsack-and-unequal-coinjoin-transaction-amounts.jpg","_links":{"self":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/12699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/users\/2824"}],"replies":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/comments?post=12699"}],"version-history":[{"count":0,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/posts\/12699\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media\/5744"}],"wp:attachment":[{"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/media?parent=12699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/categories?post=12699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitcoinmagazine.com\/wp-json\/wp\/v2\/tags?post=12699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}