Unmixed CoinJoin change? Boltz to rescue.
TLDR; Users can use Boltz submarine swaps to funnel their unmixed CoinJoin change output into lightning, resulting in increased privacy.
TLDR; Users can use Boltz submarine swaps to funnel their unmixed CoinJoin change output into lightning, resulting in increased privacy.
Bitcoin is a decentralised monetary protocol. All on-chain Bitcoin transactions are public, traceable, and permanently stored in the blockchain. Anyone can see the balance and all transactions of any address. While this transparency is great for lots of stuff that makes Bitcoin valuable, like transaction verifiability, privacy isn’t one of them. Once a Bitcoin address is used, it becomes tainted with the history of all transactions it was ever involved with. All Bitcoin transactions are composed of at least one input (where the BTC come from) and at least one output (where the BTC are sent to). Additionally, Bitcoin transactions are constructed in such a way that it includes the information about previous transactions. For example, if you received 1 BTC in an address, and intend to send 0.4 BTC to your friend, you’d need to construct a Bitcoin transaction of 1 BTC, where 0.4 BTC will be sent as payment and remaining 0.6 BTC will be returned to you as a change. This means that every single Bitcoin transaction leaves a trail that can be exploited to trace the movement of Bitcoin across the blockchain. The unspent transaction output (UTXO), as the name suggests, is the result of a transaction that a user receives and can spend in the future. Learn more about UTXOs here.
Cometh CoinJoin..
CoinJoin, which was first proposed by Gregory Maxwell in 2013, attempts to improve the privacy of Bitcoin transactions. Using CoinJoin, multiple users combine their UTXO into one large transaction with multiple inputs and multiple outputs. Each CoinJoin mixed outputs are of a fixed same amount. This breaks the traceability of the transactions and makes them indistinguishable on the blockchain, so that Uncle Sam can’t spy on you. The three main ready-to-use software CoinJoin implementations are Wasabi Wallet , JoinMarket, and Samurai Whirlpool.
Problem: Unmixed CoinJoin Change
While CoinJoin helps to increase the anonymity of a Bitcoin transaction, it comes with a caveat — change outputs, that are not of a fixed same amount, remain unmixed and can potentially break the anonymity. As explained in previous section, change output is the fundamental part of how Bitcoin transactions work. However, when you send the coins which are the change from a previous transaction, receivers and blockchain observers can easily deduce that you were involved in the previous transaction that generated the change. Identifying change based of such heuristics is one of the many methods surveillance companies like Chainalysis use to spy on users. A common pitfall is sending unmixed coins and mixed ones to the same address, which can effectively result in user’s identity getting leaked. There are few different ways to deal with unmixed Bitcoin change, we will focus on how Boltz can be used as a tool to counter this risk.
Solution: Swap unmixed change using Boltz
Boltz submarine swap service offering can help users mitigate the risk caused by the unmixed CoinJoin change. By atomically swapping the CoinJoin change for refilling lightning channels using Boltz, the user can eliminate the risk of clean coins getting tainted by accident. The Lightning network has relatively potent privacy properties. And it is not yet being tracked to the extent that on-chain coins are, this makes Boltz swaps an easy and effective way to deal with CoinJoin changes. Since the user is creating the lightning invoice that Boltz will pay in this swap process, Boltz will know the user’s node public key and the lightning channel Boltz sent the funds to. Hence, this is not a perfect solution since Boltz could cluster your change output and your lightning node. We do however hope that rendezvous routing, when integrated to the lightning spec, will make this an even more effective solution.
Demo
Below is the demonstration of swapping unmixed CoinJoin change from Wasabi (marked with a red shield) to lightning Bitcoin through Boltz.