What Is A Statechain CoinJoin?

statechain coinjoins explained

Share this article

Bitcoin is an open monetary network that anyone can use as long as they have the software to communicate with the network. Your method of interacting with the network can be as simple as using a software wallet and broadcasting via a third-party node, or you can talk to the network directly via your own node.

Interacting with the network is rather trivial.

However, moving value across it becomes a little harder since you need to acquire Bitcoin either through someone sending you finds, mining it or acquiring Bitcoin through an exchange. Most of us are not going to mine Bitcoin, and in the current ecosystem, finding people willing to transact in Bitcoin isn’t so straightforward and comes at a premium, with P2P sellers looking to net a healthy profit for their service.

The easiest way to acquire Bitcoin is often through a regulated exchange in your country; these businesses have set up local markets for you to trade your national currency for Bitcoin or to trade into stablecoins first, then use that to acquire Bitcoin. The issue with regulated exchanges is they require you to give up your personal details if you wish to transact.

Privacy protection for your personal stash.

Know Your Customer and Anti-Money Laundering laws and chain analysis might seem like a small price to pay to get easy access to Bitcoin, but they are harmful to Bitcoin privacy and, in some cases, Bitcoin fungibility. Tying your identity to the coins you have, even when moving on-chain, can build an intricate footprint of where you move your money. Funds can be tracked from exchanges, and even on what you spend your Bitcoin on in future transactions.

While nothing can be done about people willing to trade their identity for access to Bitcoin, forward privacy upon taking self-custody is a possibility. Several developers are actively working on ways to make chain analysis heuristics obsolete and ensure that Bitcoin users can continue to transact pseudonymously. The most popular forward privacy solution is the CoinJoin, which can be conducted with coordinators like Wasabi Wallet or Samouri Wallet or using an open protocol like JoinMarket.

Additionally, off-chain protocols such as the Lightning Network, Liquid Network, and Statechains can execute Bitcoin transactions without publishing data to the Bitcoin blockchain.

Why CoinJoins Have Become Popular

CoinJoin is a technique that can be used to improve the privacy of Bitcoin transactions. CoinJoin works by mixing multiple Bitcoin transactions (UTXOs) together, making it more difficult to track individual transactions. Users would send their UTXO into a CoinJoin and then receive a different set of UTXOs, all in a uniform amount, making it hard to track who owns which UTXO. 

By leveraging a CoinJoin, users can remove funds from an exchange, mix it with other users and send those new mixed funds to a wallet that an exchange would not know exists in your name. While you can’t erase your history of purchases with the exchange or your history of withdrawals, you can hide the final destination of your coins so they cannot be monitored in the future with the assumption that you own those coins.

While CoinJoins are relatively popular as a forward privacy technical, there are a number of limitations to it. 

Slow and expensive

First, they can be slow and expensive since they rely on on-chain transactions, and you have a reasonable amount of coins to be mixed. This can be pricy in terms of capital you need to commit and fees, and means it prices out certain users.  

CoinJoin coordinator rules and liquidity

Second, they require users to trust the CoinJoin service provider, that they act above board, that they blind their mixing service and that they are not willing to comply with regulator authorities when it comes to access to their service. If only certain people could use a CoinJoin, it would defeat the purpose of a CoinJoin, since the service is meant to give you privacy through hiding within a crowd of people; the smaller the crowd, the lower the privacy.

Users have to ensure forward privacy.

Third, they do not offer perfect privacy; if you have CoinJoined your funds and you dox an address by sharing it on social media or tying it to a payment with a third-party service, you have re-created the same issue you were trying to hide from and would need to go ahead and CoinJoin again. 

CoinJoin complexity

Finally, managing CoinJoin funds and conducting a CoinJoin is not the easiest thing to do for the average user. While wallets have improved to make it a lot easier, it is still a daunting process that takes a considerable amount of time and effort to do.

Naturally, the two most obvious hurdles for CoinJoin are the cost and complexity, which can be eliminated by creating an off-chain environment where CoinJoins are part of the usual process, and this is where state chains come into play.

How Statechains Work?

Statechains are a second-layer solution that can be used to improve the privacy of Bitcoin transactions by conducting transactions in an off-chain environment using a different consensus method. 

Statechains work by creating a separate blockchain that is linked to the Bitcoin blockchain. Statechains can only peg-in Bitcoin to create a “Statecoin”, which represents the signing rights to a UTXO.

Transactions on the Statechain are private, and they cannot be linked to transactions on the Bitcoin blockchain. StateChains are a cryptographic structure that consists of a chain of digital signatures transferring ownership of a specific Statechain (a Bitcoin UTXO) between owners. 

Similar to a blockchain or sidechain, the Statechain acts as immutable cryptographic proof of ownership and a proof that a Statechain (Bitcoin UTXO) has not been double spent.

In a Statechain:

  • Transfer of ownership can be fast or near-instant inside the state chain and have negligible cost (no on-chain transaction fee).
  • Transfer of ownership can be more private (transfers are only recorded on the Statechain).
  • It is possible to transfer the ownership of one public key of a multi-sig UTXO, for example, one position in a discreet log contract (DLC), or one side of a Lightning payment channel, without the cooperation of the counterparty.

How Statechain Coinjoins Work

Statechain CoinJoins are a type of CoinJoin that is implemented using the Statechain model where users transfer the ability to sign a single public key spending condition between parties. In a Statechain you’re not swapping the UTXO between users wallets, but you’re swapping the signing rights to that UTXO, and the Statechain maintains who owns the signing rights and ensures that there are no double-spends when a user wishes to redeem funds on-chain.

Statechain CoinJoins offer a number of advantages over traditional CoinJoins. 

  1. First, they are faster and cheaper. 
  2. Second, they do not require users to conduct a special on-chain transaction, or use a specific wallet; it is all managed within the Statechain wallet like Mercury wallet, all you as a user need to do is decide on how much you wish to CoinJoin and how many swaps you wish to participate in.
  3. Third, you can keep your funds in your Statechain wallet and only pull out funds on-chain when you need them so users can do CoinJoins on the fly.

The Benefits of Statechain Coinjoins

Statechain CoinJoins offer a number of benefits over traditional CoinJoins. 

These benefits include:

  • Increased privacy
  • Reduced fees
  • Faster transactions
  • Users can top up their wallets anytime. 
  • Users can withdraw their funds at anytime (as long as funds are not in a swap group)
  • Users can decide how many swaps they wish to do
  • Users have more flexibility with smaller amounts that can be CoinJoined
How to use Statechain via Mercury Wallet

In a constant state of CoinJoin

When you deposit funds into a Statechain, you’re encouraged from the beginning to deposit funds of a certain amount, be that 10 million sats, 1 million sats or 100 thousand satoshis. This makes it rather easy for any user to understand and follow, and in addition, depending on the liquidity in the Statechain, it often encourages users to fund in certain increments.

Users can now have the freedom to create several Statecoins over a period of time. Let’s say you’ve been stacking in increments of 1 million satoshis over a year; by the end of the year, you could have created 12 Statecoins of 1 million satoshis each, which you could CoinJoin and remove to your on-chain wallet for a much cheaper fee. You could also use your Statechain wallet to receive Bitcoin from others in the form of on-chain Bitcoin or Statecoins and mix them together. 

Once you have funds in your Statechain wallet, there’s a native swap option in which you can either select the amount you wish to swap and join a swap group, or you can choose the autoswap option that will include your coins in several swaps until you remove the funds. 

Statechain CoinJoins could be an alternative for those who have felt priced out by on-chain CoinJoins or those looking to accumulate off-chain before CoinJoining at their own pace and therefore fund a different market to those who use traditional CoinJoin. Since CoinJoins in Statechains are free or low cost after your peg-in on-chain and peg-out fee to on-chain, they also allow you more control over how much you spend in the entire CoinJoin process. 

It remains to be seen how far this tech will go, how many coordinators will spin up Statechain servers and how they will attract liquidity. There is a possibility that Swap coordinators could set up swap markets where liquidity could earn a yield for the time they remain in swaps and provide users with more obscurity through the number of Statecoins available to swap at certain sizes. 

Additionally, getting capital in and out of Statechains doesn’t have to be limited to on-chain transactions, and adding Lightning support to fund Statecoins or move into Lightning, create channels or rebalance channels, could provide alternative routing and reduce the need for on-chain channel management and therefore reduce costs. 

Statechain CoinJoin is a promising new technology that can be used to improve the privacy of Bitcoin transactions. Statechain CoinJoins offer a number of advantages over traditional CoinJoins, including increased privacy, reduced fees, faster transactions, and no need to trust a third party.


Do your own research.

If you want to learn more about statechains on Bitcoin, use this article as a jumping-off point and don’t trust what we say as the final say. Take the time to research, check out their official resources below or review other articles and videos tackling the topic.

Are you moving off to layer 2

Have you been using layer 2 Bitcoin for privacy to make micro-payments? To test out wallets or engage with apps? Which app or layer two solution is your favourite? Which one do you prefer and why?

Let us know in the comments down below.

Disclaimer: This article should not be taken as, and is not intended to provide any investment advice. It is for educational and entertainment purposes only. As of the time posting, the writers may or may not have holdings in some of the coins or tokens they cover. Please conduct your own thorough research before investing in any cryptocurrency, as all investments contain risk. All opinions expressed in these articles are my own and are in no way a reflection of the opinions of The Bitcoin Manual

Leave a Reply

Related articles

You may also be interested in

Alby Sunsets Custodial Wallet

Alby To Sunset Custodial Wallet

Dear Alby Users, We always knew this day would come when the training wheels would have to come off, and that day is set in

Cookie policy
We use our own and third party cookies to allow us to understand how the site is used and to support our marketing campaigns.