There’s nothing worse than being surprised by the fees of a product after using it. With the advent of high mining fees on the Bitcoin network, it’s important to be mindful about the fees you’re paying for coinjoin transactions.

If you’re like me, you want to know in advance how much it’s going to cost you to use a privacy wallet. Coinjoins require on-chain transaction fees, which are collected by miners, and often involve coordination fees, which are collected by the coinjoin transaction coordinator (or in Joinmarket’s case, providers of coinjoin liquidity). 

The question then becomes: How do coinjoin wallets compare on fees?

Bitcoiners may find different protocols advantageous depending on the amount they are coinjoining, or how long they are willing to wait before spending. For example, if an input you want to coinjoin is of a ten million sats or less, WabiSabi wallets are ideal unless you’re willing to wait days or weeks coinjoining, which in that case Whirlpool would be better due to the free remixing policy. 

In cases where you are willing to provide liquidity and wait for others to coinjoin, you may prefer acting as a Joinmarket maker to passively earn sats. Finally, if you’re coinjoining more than 1 BTC, Joinmarket basically almost always wins in terms of fees. 

It’s also important to remember that this analysis was purely from the fees to be paid point of view, and didn’t take into account how strong each privacy guarantee is for each protocol. To learn more about the benefits and the tradeoffs of each coinjoin protocol and wallet, visit the open-source educational website Coinjoins.org

If you want to know how WabiSabi, Whirlpool and Joinmarket fee structures work, read on. We’ll define all the fees of a coinjoin transaction, the way fees are calculated for each protocol and finally, which one is better for many different user profiles. 

What are the Different Fees for Coinjoin Transactions?

To answer what are the different types of fees on a coinjoin transaction, we will explain how coordinator fees work for each protocol, and then how mining fees work for each protocol. 

What are Coinjoin Coordinator Fees?

Protocols like WabiSabi and Whirlpool use a centralized coordinator model to scale privacy, allowing multiple users to cooperate in a transaction without any participant knowing which coins belong to the others. Cryptography and discreet network communication are required in order to ensure that movements of funds are not revealed to the coinjoin coordinator. To learn more about how coinjoin protocols work, read more on Coinjoins.org.

Coordinator fees are what you pay the third-party in exchange for their services. The fee can be static (fixed amount) or dynamic (percentage). 

Coordinator Fees for WabiSabi Coinjoins

For example, in WabiSabi wallets like Wasabi Wallet, BTCPay Server or Trezor Suite, coordinator fees are 0.3% (dynamic) of what you’re mixing (for the zkSNACKs coordinator). You’re only charged on the first transaction so remixing is free of coordinator fees. Also, if someone sends you coinjoined bitcoin, your coordinator fees are waived too. This feature is called Friends don’t pay.

In addition, the Plebs don’t pay feature makes it that coordinator fees are waived for any coinjoin input less than 1,000,000 satoshis (0.01 BTC). This improves accessibility for users with low amounts of bitcoin. 

Coordinator Fees for Whirlpool Coinjoins

On the other hand, on Whirlpool wallets like Samourai, Sparrow, and Bitcoin Keeper, coordinator fees are of a fixed amount, depending on the liquidity pool you choose to be part of. Here’s the breakdown per pool:

  • 100,000 satoshis pool: 5,000 sats of coordinator fees
  • 1,000,000 satoshis pool: 50,000 sats of coordinator fees.
  • 5,000,000 satoshis pool: 175,000 sats of coordinator fees.
  • 50,000,000 satoshis pool: 1,750,000 sats of coordinator fees.

You might be wondering what a coinjoin pool is. In short, it’s the coinjoin output denomination amount. The 100,000 satoshis pool will result in coinjoined outputs of that precise size. Here’s a visual example for the 5,000,000 satoshis pool: 

As you can see, every output is of the same value. When you enter a pool, you pay the fixed fee amount. However, you can enter a pool with much more than the pool denomination, to be exact you can enter with up to 70 times the pool denomination, split across 70 outputs (for the 100k sats pool it’s only 25 times). 

Now on to Joinmarket, which doesn’t have coordinator fees but there are coinjoin fees.

Coinjoin Fees on Joinmarket

Joinmarket works differently than other coinjoin protocols because it doesn’t have a centralized individual entity coordinator, but rather two user roles in a P2P (peer-to-peer) environment: makers (who provide liquidity for a fee) and takers (who pay a fee for liquidity and coordinate the transaction). Any user can be a maker or a taker.

In short, instead of paying for coordination, you pay for liquidity. There’s an orderbook with all maker offers and at different price points. Some charge a static fee (fixed amount) but most charge a dynamic fee (a percentage of the liquidity used). 

When you’re a taker, you use the liquidity of many makers in a single transaction, usually 8, which makes 9 participants including you. You pay each maker what they ask for. For example, if there’s 8 makers and each charge a dynamic fee of 0.0001% BTC for the liquidity used, and you use 1 BTC of each, you pay a total of 10,000 sats * 8 = 80,000 sats.

This is the case for each Joinmarket transaction you’re the taker on. If you’re a maker, you enjoy privacy and you get paid for it: the best of both worlds.

How Mining Fees Work on Coinjoin Transactions?

Mining fees are part of every transaction on the bitcoin network, and coinjoins are no exception. It works differently for all three major protocols. Here’s a tool to calculate bitcoin transaction size

Mining Fees on WabiSabi Coinjoins

On WabiSabi coinjoin transactions, you only pay the fees associated with the blockspace your inputs and outputs take. For example, if you have a P2WPKH (segwit native) wallet and you have 3 inputs and 5 outputs in a coinjoin transaction, and the current fee is 50 sats/vbyte, you will pay:

Total blockspace: 3 * 68 vbytes + 5 * 31 vbytes = 359 vbytes

Total mining fees: 516.5 vbytes * 50 sats/vbytes = 17,950 sats

You pay exactly what you consume in blockspace, in every coinjoin transaction you participate in. 

Mining Fees on Whirlpool Coinjoins

The mining fee structure of Whirlpool coinjoins is a bit more complicated, but nothing that we can’t explain. Here it goes.

First off, it’s important to understand that before the coinjoin process begins, a premix transaction, also known as Tx0, takes place. The claimed purpose is to split your total input amount into the outputs to coinjoin, the non-private change output that goes into a separate wallet account called BadBank, and the coordinator fee to pay. 

For example, if you have a 1,500,000 sats UTXO for the 1,000,000 sats denomination pool, your premix transaction (Tx0) will have 1 input and three outputs: one output to coinjoin, a 50,000 sats output to pay the coordinator, and a non private change output that goes to the BadBank wallet account.

It’s important to understand that your premix can have many inputs and many outputs to coinjoin (up to 70), but the minimum number of inputs is 1 and outputs is 2 (if there’s no change). 

The first part of the mining fees for Whirlpool coinjoins is the fee you pay for the premix transaction. However, there’s a second part: you have to pay mining fees for the first coinjoin transaction, and not only for you, but for anyone remixing in it. You share that cost with at least one additional user out of 5, but it can be up to 4 out of 5 participants. When you remix and enter further coinjoins, you don’t pay any fees.

How to calculate Whirlpool Tx0 Mining Fees

The formula for the mining fees on Tx0 is as follows (assuming all are P2WPKH UTXOs): 

Total vbytes: Base transaction vbytes + input vbytes * number of inputs + output vbytes * 2 (for change and coordinator fee outputs) + output vbytes * number of coinjoin outputs

Which comes out to: 10.5 + 68 * inputs + 31 * (2 + cjOutputs)

For example, if there are 5 inputs and 10 cjOutputs, the total vbytes will be:

Total vbytes: 10.5 + 68 * 5 + 31 * (2 + 10) = 722.5 vybtes

Total fees (assuming 50 sats/vbyte): 722.5 * 50 = 36,125 sats

How to calculate Whirlpool Coinjoin Mining Fees

Regular Whirlpool coinjoin transactions have 5 inputs and 5 outputs, which comes out to a total of 505.5 vbytes. Considering that 2 new entrants are paying, this splits the duty in two. You’re then responsible for paying 202.75 vbytes, for each one of your 10 coinjoin outputs.

Total fees (assuming 50 sats/vbyte): 202.75 * 50 * 10 = 101,375 sats

This gives you a total of 36,125 + 101,375 = 137,500 sats to pay on mining fees. However, this is a one-time fee, and you will be able to remix for free, for as long as you want.

Now, let’s cover the remaining protocol, Joinmarket.

Mining Fees on Joinmarket Coinjoins

By default, a taker is in charge of paying all the mining fees for a Joinmarket coinjoin transaction. However, there’s a setting for makers to include a mining fee contribution in their offers. In practice, as of the 10th January 2024 at 6:00 AM UTC, there’s not a single offer that includes a mining fee contribution out of 65 offers.

This means that as a taker you will almost certainly pay the entirety of the mining fee required for the Joinmarket coinjoin. This means that for every input, there will be a coinjoin output and a change output. If there are 9 participants, there are at least 9 inputs (there can be more), and at least 18 outputs. It’s also not mandatory that everyone uses the same wallet standard, which means some inputs can cost more than others. Let’s assume every input and output is P2WPKH and that every participant only has 1 input.

Total vbytes: 9 * 68 + 18 * 31 = 1,170 vbytes

Total fees (assuming 50 sats / vbyte): 58,500 sats

In short, the formula to calculate the mining fees paid is (68 * number of inputs + 31 * number of outputs) * mining fee in sats / vbyte.

Now that we’ve broken down how exactly to calculate the fees for every coinjoin protocol, let’s examine which would be better for different profiles.

I have a 990,000 sats (0.099 BTC) UTXO to mix. Which protocol is better for fees?

If you have a million sats or less, here are the coordinator (liquidity for Joinmarket) fees paid for every different coinjoin protocol:

  • You won’t pay any coordinator fees with WabiSabi.
  • You can only enter the 100,000 sats pool on Whirlpool and you will pay 5,000 sats in coordinator fees.
  • FOR TAKERS only: On Joinmarket, it depends on the orderbook: as of the 10th of January 2024, you will pay an average of 0.0007% for 8 makers, which would be a maximum of 56 sats (depending on the mining fee market to know how much you have left in sats). 

Here are the mining fees to pay for every different coinjoin protocol (assuming 50 sats/vbyte);

  • WabiSabi: Assuming you have 1 input and 7 outputs (extremely high estimation) are created, you will pay 17,925 sats for the first coinjoin transaction. For each further coinjoin transaction, considering you will have 7 inputs now, you will pay 35,175 in sats.
  • Samourai: assuming you have 1 input and 8 coinjoin UTXOs will be created, you will pay a total of 120,650 sats for the Tx0 and the coinjoin mining fee.
  • Joinmarket (FOR TAKERS only): assuming you have to pay for a total of 9 inputs, and 18 outputs, you will pay a total of 62,150 sats for each coinjoin transaction. 

In total:

  • WabiSabi: 17,925 sats for first, 35,175 sats for further transactions.
  • Whirlpool: 125,650 sats in total.
  • Joinmarket: 62,182 sats for each transaction.

The conclusion for this user profile is that WabiSabi is better if you’re doing 4 transactions or less, but Whirlpool will become more economical after that. It depends on whether you want to mix fast or slow, and also it’s important to consider that to gain the same level of privacy as with 4 WabiSabi transactions, you will need to make many more on Whirlpool.

Joinmarket is not worth it for this amount unless you’re a maker.

The winner for this user profile: WabiSabi Coinjoins.

I have 10,000,000 sats (0.1 BTC). Which wallet is better?

Now that we’ve broken down the first user profile, we can just jump straight to total fees for the next ones. We keep the same assumptions. 

Total fees for each coinjoin protocol:

  • WabiSabi: 30,000 sats (coordinator fee) + 17,925 sats (mining fee) = 47,925 sats for first + 35,175 sats for further transactions.
  • Samourai 1M sats pool: 50,000 sats (coordinator fee) + 134850 (total mining fee) = 184,850 sats (5M sats would be possible too but not as economical and with more change)
  • Joinmarket (FOR TAKERS only): 317 (liquidity fee) + 62150 (mining fee) = 62467 sats for each transaction

Joinmarket is more competitive but the result remains the same. WabiSabi is better for 3 transactions or less, and Whirlpool for continuous remixing. However, 3 WabiSabi transactions gives you a sufficient level of plausible deniability that is enough to make tracking the transactions of most users super hard.

Winner: WabiSabi (unless you’re a Joinmarket maker)

I have 100,000,000 sats (1 BTC). Which wallet is better?

Total fees for each coinjoin protocol:

  • WabiSabi: 300,000 sats (coordinator fee) + 17,925 sats (mining fee) = 317,925 sats for first + 35,175 sats for further transactions.
  • Samourai 5M sats pool: 175,000 sats (coordinator fee) + 276850 (total mining fee) = 451,850 (50M sats would be possible too but not as economical and with more change)
  • Joinmarket (FOR TAKERS only): 3168 (liquidity fee) + 62150 (mining fee) = 65,318 sats for each transaction

For this category, Joinmarket is the winner under 7 transactions, then Whirlpool is more economical. WabiSabi is better than Whirlpool for 3 transactions or less.

Winner: Joinmarket

I have 1,000,000,000 sats (10 BTC). Which wallet is better?

Total fees for each coinjoin protocol:

  • WabiSabi: 3,000,000 sats (coordinator fee) + 17,925 sats (mining fee) = 3,017,925 sats for first + 35,175 sats for further transactions.
  • Samourai 50M sats pool: 1,750,000 sats (coordinator fee) + 276850 (total mining fee) = 2,026,850 sats in total
  • Joinmarket (FOR TAKERS only): 31680 (liquidity fee) + 62150 (mining fee) = 93,830 sats per transaction

For this category, Joinmarket is the winner under 20 transactions, which just means it’s the winner hands down. 

Winner: Joinmarket

Conclusion

In this article, we explained how fees work on every major coinjoin protocol such as WabiSabi, Whirlpool and Joinmarket. We then compare them in different contexts ranging from a user that has less than a million sats to one that has a billion sats. Many assumptions are required to be made, but the formulas are shared so you can calculate it in other scenarios where variables such as the number of inputs, the number of outputs and the current mining fee, change. 

It’s also important to remember that this analysis was purely from the fees to be paid point of view, and didn’t take into account how strong each privacy guarantee is for each protocol. To learn more about the benefits and the tradeoffs of each coinjoin protocol and wallet, visit the open-source educational website Coinjoins.org