In this article we discuss the privacy of CoinJoin in comparison with Lightning transactions.
As Bitcoin adoption increases, privacy challenges and their solutions come increasingly to the fore. Satoshi’s initial implementation was never designed to mask the individuals linked to pseudonymous wallet transactions.
As our lives become increasingly digital, privacy, or more accurately the option to exercise privacy, becomes more important. Early cyberpunk privacy advocate Erik Hughes succinctly describes how:
“Privacy is necessary for an open society in the electronic age. Privacy is not secrecy. A private matter is something one doesn’t want the whole world to know, but a secret matter is something one doesn’t want anybody to know. Privacy is the power to selectively reveal oneself to the world.”
When the sovereign individual considers the privacy tools available, the two that stand out are Coinjoin and Lightning. Evolving, with different implementations and use cases, we considered the pros and cons of each technology and why one might consider one over the other.
Table of Contents
CoinJoin
The challenge with maintaining privacy in a Bitcoin transaction is that UTXO’s, (the components of a Bitcoin), are not fungible by default. A privacy tool is required to break the links between transaction inputs and outputs.
A non-custodial Coinjoin provider takes inputs from multiple wallets, mixes them together to obscure their origin, before returning an equivalent amount to each wallet. There are currently many different coinjoin implementations; for example Wasabi is one of the better known with an easy to use UX. So how can we measure the privacy offered in different Coinjoin offerings.
- Deterministic links. Change from a Coinjoin transaction has a high deterministic link. If one outputs to a wallet containing change that can be linked to previous transactions, then all contents of the wallet will be compromised. To this end, it is preferable to find a Coinjoin implementation that supports variable coin denominations, for example 3 different inputs of 0.25, 0.1, .0.75 btc. This will lower the chance of change outputs.
- Number of Inputs. How many inputs does the Coinjoin provider support. The more the better, especially if using variable inputs. In other words, liquidity variance is important, but user count matters also.
The eventual goal of improving Coinjoin will be to make a transaction appear as a normal bitcoin on chain transaction. Until then there is a need for individuals to educate themselves on the various trade-offs.
The Lightning Network
Lightning is a layer 2 solution often described as an antidote to Bitcoins inherent privacy challenges. Lightning payment channels send and forward multiple transactions before final settlement is completed on-chain at a future date. Lightning is a more secure solution than Bitcoin proper, as it only broadcasts to the channel nodes.
This is different from Bitcoin where every transaction must be broadcast to the entire network and then confirmed. These broadcasts include the UTXO’s and the address of the receiver. However privacy on the Lightning network is not as easy as first thought. The gossip network is necessary to build payment routes and it inherently leaks privacy details.
Lightning involves a trade-off; the more privacy a lightning implementation focuses on, the less reliable the payment channel becomes and visa versa. This is because Lightning uses a fixed node ID. Adding additional routes to a node ID for increased privacy will reduce payment reliability.
Another issue to consider when choosing a particular implementation is scale. As Lightning use grows, what “footprint” does a particular implementation have on the blockchain. Is there an efficiency on scale that will allow scaling as payments increase in frequency.
Some people see Lightning will be as private as cash in the future by solving two main issues; sever the link between on-chain & Lightning and add noise to routing data to break timing analysis.
Lightning or CoinJoin what’s better for your Bitcoin privacy?
It remains to be seen how Lightning and Coinjoin evolve as early adopters become mainstream. Other participants in a particular Coinjoin transaction could, over time, inadvertently doxx themselves, reducing the level of entropy or randomness of a transaction.
With Lightning, the decision will be whether to favour privacy over reliability. As the market matures, lightning competitors will provide the choice which suits customers best. Corporates may favour an implementation with less privacy and more reliability for example, while individuals may opt for an implementation that is more private and less reliable.
The essence of privacy is to have the option what to reveal and when to reveal it. Cash is an anonymous technology that is becoming increasingly sidelined. In the future privacy will become a technological arms race. One future vision is the ability to open lightning channels inside a Coinjoin.
Companies like Chainalysis who monetize tracing connections between wallets and entities are helpless against Coinjoin and Lightning. As a result we will see increasing regulation against these tools. Ultimately, you could win the privacy battle but get hurt in the regulatory war as services elect to block transactions that have used tools like Coinjoin.