Meet CoinJoin a decentralized and secure currency mixing protocol for Bitcoin and compatible cryptocurrencies, which allows users to improve their privacy and anonymity levels, protecting their identities from blockchain and BigData analysis tools.

El protocol CoinJoin, is a protocol implemented for improve the privacy and anonymity of the users of Bitcoin. This method consists of being able to unify in a same set all the transactions that will be carried out by different users of the system. Thus, once all these transactions were unified, no user could determine where the funds come from; since the entrances and exits of said transactions cannot be seen or associated. Thus, even the recipient of a transaction cannot tell where he received the transferred funds.

The implementation of this method is particularly useful to avoid tracking the funds received or payments made in the Bitcoin system. Especially if we take care of our privacy and remember that Although Bitcoin is private, it is not anonymous.. This means that it is possible to trace Bitcoin transactions to the point of finding your identity. It is certainly not an easy task, but transaction analysis and digital profiles allow this type of construction, however difficult it may seem. It's getting easier and easier to do, and Bitcoin transactions never disappear, nor will they disappear, with all their bindings done.

For that reason, and to increase privacy, CoinJoin was designed. Now let's know how CoinJoin works, what options it offers us and its capabilities and limitations (which it also has).

CoinJoin Origin

The concept was introduced by the developer Gregory Maxwell, who in August 2013 made a publication in your account BitcoinTalk, where he explained in detail the development and operation of his idea, also highlighting that it does not imply a modification in the Bitcoin protocol.

The need for these types of solutions stemmed from the search for a more protected privacy within Bitcoin. Let's remember that Bitcoin is not a truly anonymous cryptocurrency, but a pseudo anonymous. This means that each of the transactions we carry out appears completely transparent on the blockchain.

But not only that, but it is also possible to create a complete profile of the addresses we use. Including from which addresses we receive money or to which addresses we send, specifying amounts in each of them. Of course, in each of these transactions there is never data such as names or that directly identifies us as users.

But if hackers and analysts like something, it's the challenges. Bitcoin's privacy challenge led these groups to create specialized tools to study this data and relate it to any other online activity we have. As a result, they collect our data on the blockchain and on the Internet, create a profile and if we are not careful enough, they can very safely find our real identities.

This is how several blockchain analysis companies manage to find the identity of many cryptocurrency users, and this is how privacy and the pseudo-anonymity of Bitcoin are reduced to nothing.

Against this background, the creation of CoinJoin was shown as a satisfactory response. This is because if used correctly this tool makes it practically impossible to track Bitcoin users. In addition, the creation of CoinJoin was technically superior to that of the mixer coin, another option that was already used at the time. The reason is that CoinJoin acted as a P2P protocol while mixer coins were centralized, given to scams and other looting.

How does CoinJoin work?

Firstly, to carry out a CoinJoin transaction it is necessary for several network users to make the decision to use this method. That is, everyone agrees on merge transactions to make a single grouped and joint transaction. That is, without other people (or rather, addresses with funds) wanting to mix with you, you cannot use CoinJoin.

However, this does not mean that by grouping all transactions into one, you are in some way giving up control over the transactions to a specific party. No, rather it is the opposite. In Bitcoin CoinJoin transactions the signatures of each transaction remain independent of each other. This regardless of the number of transactions that are grouped within a CoinJoin transaction.

Then, each user will have particular control over their inputs and outputs and will sign an operation only if they agree with the transaction and if it is correct. And until all participating users within a CoinJoin transaction sign, the transaction will not take place.

Now, once all users sign each particular transaction, they will be grouped into the same CoinJoin transaction, which will be processed and validated by the miners to include it within the blockchain. Where it will be reflected as a single and joint transaction, which does not clearly show where the funds came from or where they were sent.

Understanding how CoinJoin works

Now to understand exactly how CoinJoin works it is best to see it through an example. So we have the following case:

Suppose Maria wants to transfer 1 BTC from address A to address B. While Juan wants to transfer 1 BTC from address C to address D. To make this transaction private, they both decide to use CoinJoin for the purposes of combining their transfers in a single transaction that has two inputs (A and C) and two outputs (B and D).

What CoinJoin does in all this is to take the inputs of Maria and Juan, combine them in the same transaction, and from them, mix these currencies to generate the transactions that will go to their destination. If the operation requires the refund of an exchange, the CoinJoin transaction will also create this transaction and send it to an exchange address under the control of the person to whom those currencies belong. The CoinJoin payment operation will only be carried out when María and Pedro cryptographically sign their respective transactions.

However, the trick CoinJoin does shows all its power on the blockchain. Normally, Maria and Juan's transactions would show a clear pattern of sending coins. That is, the coins go from their address to the destination address. But in CoinJoin we can see a single transaction where multiple inputs are joined and there are several outputs.

This makes it more difficult for a third party to determine which recipient received which output. Even, the receiver of the transaction could not determine from which address the funds received come, because the UTXOs are not directly related to an address itself, but to a transaction of multiple entries, all of them independent.

From this example we can deduce the following:

  1. CoinJoin uses the scheme of the UTXO or unspent Bitcoin coins, to generate with them a massive scheme of entries for the same transaction. Of course, these UTXOs come from the balance available to each of the people who participate in the CoinJoin scheme, so the more people participate the greater the level of anonymity achieved.
  2. By taking all the UTXOs of the people in the CoinJoin as inputs, a mixing of coins from these UTXOs is generated.
  3. The payment of the CoinJoin will be carried out once all the people sign the joint transaction and agree with the balances that it presents.
  4. Finally CoinJoin will make the payment. Depending on the implementation, CoinJoin can make various payments to other intermediate addresses that will also create an additional CoinJoin. A measure that seeks to increase the level of security of the transaction. But eventually, the CoinJoin will bring Maria and Juan's payment balance to their recipients. In the blockchain we will see a single transaction, multiple outputs and nothing that relates them to each other. We have made an anonymous transaction.

Why is CoinJoin important in Bitcoin?

Bitcoin is a system decentralized and autonomous that offers a certain degree of privacy in transactions. Since instead of requesting personal data as in traditional systems, Bitcoin uses only addresses, which work as a type of bank account where you can receive money without any risk. However, Bitcoin is also a system transparent and auditable, which means that in a blockchain explorer You can freely observe the transactions carried out in this system from its beginnings in 2009 to the present.

Thus, even if personal data is not disclosed, any third party could follow certain addresses to see how the funds move or are managed in it. Determining the transactional activity of a user within the network. Remember that, although Bitcoin does not use personal data of a user, it is possible to associate a particular address with a person or company.

For example, if that person or company has openly published that it is the owner of a particular address, or if the IP addresses from where various transactions have been made are monitored and followed up. This is why Bitcoin is known as a pseudo anonymous systemIn other words, it offers partial anonymity to its users.

This feature makes it possible, in Bitcoin, to mark / label certain currencies as “corrupt or contaminated”. If, by following up, they are found to have been involved in fraudulent money laundering or financing of illegal activities. What also subtracts the quality of fungibility to cryptocurrency; that is, its ability to be consumable and expendable. Since many users of the network will not want to use those cryptocurrencies that have been branded as “contaminated” because they are linked to illegal activities. So one bitcoin is no longer the same as another bitcoin.

That is why the implementation of the CoinJoin method offers a viable solution alternative for these privacy problems of the Bitcoin system. By preventing transactions made on the network from being tracked by third parties or linked to certain activities.

CoinJoin Implementations

As we mentioned at the beginning, CoinJoin was initially implemented on the Bitcoin blockchain in order to improve your privacy and anonymity. However, to date there are several implementations of this method, the most common and widely used being Samourai Wallet, Wasabi wallet y JoinMarket.

La Samourai Wallet It is oriented towards the protection and guarantee of privacy of users. So it implements the CoinJoin method through the interface of Whirlpool to mix and match the inputs and outputs of transactions from the same user, to make them appear to come from a CoinJoin transaction. This wallet is available for both computers and smartphones that operate with the Android system. Additional, we have a complete guide on how to use Samurai Wallet and its Whirlpool so you can get the most out of CoinJoin.

For its part, Wasabi wallet use the service of Chaumian CoinJoin and the network protocol Tor to mix transactions and guarantee maximum privacy to its users. Making transactions virtually impossible to track, as well as the public IPs used. Both wallets handle commission rates for using these privacy and anonymity services.

Likewise, the implementation of the software JoinMarket de CoinJoin also seeks to improve privacy and anonymity in Bitcoin transactions. Allowing users to buy, at a very low fee, a place within a CoinJoin transaction, as if it were a market. In fact, JoinMarket It operates as a market for Bitcoin transactions.

In summary, the implementation of CoinJoin has turned out to be a very effective and efficient method to ensure privacy and anonymity in the Bitcoin network. But like any method, it requires massive use to guarantee anonymity in all existing bitcoin coins to date. The greater the number of users that implement CoinJoin, the greater the number of private bitcoins.

Curiosities about CoinJoin

At this point it is important to highlight some curiosities about CoinJoin born from questions and concerns of Bitcoin users. Among them we can mention:

CoinJoin and the myth of absolute anonymity

CoinJoin does not guarantee 100% anonymity. This is because data analysis, blockchain behavior, even network data interception can still be done for the analysis of a target under investigation that uses Bitcoin. So the myth that CoinJoin guarantees 100% privacy is false. It certainly improves it on a level not seen in Bitcoin without this protocol, but complete anonymity is not guaranteed in any way.

Transaction costs

The cost of a CoinJoin transaction is much higher than that of a common Bitcoin transaction. This is because CoinJoin performs “mix jumps” that are nothing more than additional cryptocurrency transactions between CoinJoin participants. Each of these jumps generates a new transaction that in turn has an associated mining fee. In total, the more mining jumps the greater the anonymity achieved but the higher the cost of the final CoinJoin transaction will have.

How much do you know, cryptonuta?

Can a Coin Join transaction be tracked?

FALSE!

An effective CoinJoin transaction is not traceable. There is no way for a company to find the origin and destination of the funds, if the origin uses a CoinJoin transaction and it has had enough entropy to carry out. That is, if a lot of people participate in a CoinJoin transaction, the safer it is. Hence, proponents of this technology always argue that the company of about 50 people in a CoinJoin is ideal, although more than that, it is much better.

Pros and Cons of CoinJoin

Now that we know a little more about CoinJoin and what it does, it is time to know what the pros and cons it represents. In this sense we can mention:

Pros

  1. Greatly improves the privacy of our cryptocurrency operations.
  2. Helps avoid coin tagging within centralized environments. For example, a coin that has been used in criminal environments can be laundered and re-circulated without problems. Something especially useful if the currency has returned to legal hands and more if we consider that Bitcoin is limited to only 21 million coins.
  3. CoinJoin does not need any protocol changes to work. Something positive that maintains Bitcoin's compatibility with other clients without causing major problems.

Cons

  1. CoinJoin may stain our Bitcoin with other Bitcoin from illegal activities. Here is a judgment of value, freedom and moral on the part of each user, in which it must be borne in mind that if you join CoinJoin, users who have acquired that bitcoin illegally can participate with you.
  2. There may be exposure of user data. This is possible if you join your managed balances with CoinJoin together with other managed balances with your identity. At this point it is possible to do a data analysis that can reveal your identity even if you use CoinJoin.

The future of privacy and anonymity in Bitcoin

Now, certainly that Bitcoin is not completely anonymous has caused different reactions in the community. On the one hand, many users believe that Bitcoin should be anonymous in its entirety, and this is shared by many developers. So the question remains: what can we expect in the future of Bitcoin? The truth is that a lot. The creation of CoinJoin is an answer to the privacy needs of many people. It's certainly not a default build that works for everyone, but the option is there and it works great.

But we must be aware that privacy, anonymity and complete security cannot be guaranteed in a 100% digital world. That said, Bitcoin developers have been more cautious and have focused efforts on better protecting privacy and creating various mechanisms to help better protect privacy and pseudo-anonymity already available in Bitcoin. Creations like CoinJoin, JoinMarket, or sidechains like Lightning Network and Liquid Network help a lot to build better privacy and anonymity for those who require it.

Another example of the development of privacy and anonymity options in Bitcoin are the Confidential Transactions. These types of options can be seen designed in the project BlockStream Elements and they apply to Bitcoin, where they can be activated through a soft fork. So in a nutshell, in Bitcoin they bet on anonymity of choice and not anonymity by default, understanding that anonymity by default and security by obscurity, do not actually offer 100% certainty that said anonymity is complete.

In fact, that type of approximations what you can do is introduce changes that are incompatible with the current network requiring hard forks. It can also lead to serious security flaws due to the difficulty of transferring more advanced encryption techniques and in order to achieve anonymity on the network. A good example of this can be seen in the events of Zcash and GRIN.

In the first case, Zcash had a bug for several months that allowed anyone who knew him to create coins from scratch. This includes the coinbase transactions that generate those coins. A serious mistake that could lead to said cryptocurrency to total catastrophe. In the second, the MimbleWimble protocol it has a design that can be exploited to destroy all the privacy and anonymity that he claims to have.

Faced with events like these, Bitcoin's approach is not only more cautious, but less risky for both the ecosystem and the protocol itself. And at the same time, it allows you to create privacy tools that improve more and more over time.