Technical Archives - Wasabi Wallet - Blog https://blog.wasabiwallet.is/category/technical/ Wasabi Wallet Blog: Insights on Bitcoin Privacy & Tech Tue, 06 Feb 2024 15:17:47 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.3 https://blog.wasabiwallet.is/wp-content/uploads/2022/05/cropped-ww_blog_icon-32x32.png Technical Archives - Wasabi Wallet - Blog https://blog.wasabiwallet.is/category/technical/ 32 32 Time is Money: DoS (Denial of Service) Fortification and Coinjoin Time Preference https://blog.wasabiwallet.is/dos-fortification-and-coinjoin-time-preference/ Tue, 06 Feb 2024 14:58:32 +0000 https://blog.wasabiwallet.is/?p=3211 As a result of months of hard work by the Wasabi and Tor developers, updated statistics from October 2023 show that the overall success rate has more than doubled since the previous year, with over 50% of new rounds and over 80% of blame rounds succeeding.

The post Time is Money: DoS (Denial of Service) Fortification and Coinjoin Time Preference appeared first on Wasabi Wallet - Blog.

]]>

Defeating Anonymous Attackers

Coinjoins are privacy-preserving transactions that contain funds from many users. This operation requires unanimous teamwork: Unless every user signs the transaction, Bitcoin nodes will reject it as invalid, and no privacy progress will be made. This poses a challenge to honest users since there is no cost to an attacker who continuously causes coinjoins to fail, resulting in a denial of service (DoS).

This is where the role of the centralized coinjoin coordinator comes into play. The coordinator acts as a bouncer to exclude known troublemakers, ensuring that honest users are not left waiting indefinitely. ZkSNACKs, which runs the default coordinator for Wasabi Wallet, uses a handful of methods to identify and defeat DoS attacks to improve coinjoin success rates.

First, the economics of DoS attacks are considered. The minimum value allowed to participate in a Wasabi coinjoin is 5000 sats (0.00005000 BTC). When disrupting a coinjoin round, the attack is equally effective whether the missing signature belongs to a low-value input or a high-value input. Due to this threat of an attacker splitting his coins into small pieces, low-value coins are subject to longer bans than high-value coins.

Second, DoS penalty evasion is considered. If a particular address is banned for causing a coinjoin to fail, the attacker can move the coins from the banned address to a fresh address and attempt to register again. To combat this circumvention, bans from previously offending addresses are inherited by the coins they send. This prevents attackers from reusing the same funds for multiple disruptions.

Third, the nature of the offense is considered. There are 3 ways to cause trouble with a coinjoin transaction:

  • Register inputs and fail to sign the final transaction
  • Double spend a registered input before signing
  • Double spend a registered input after signing

Failure to sign may not be intentionally malicious since it can occasionally occur due to limitations of the Tor network’s stability, or because a careless user closes his laptop after the input registration phase. Double spending is prevented by clients and is a clearer indicator of deliberate disruptive activity. The type of offense and the history of previous offenses affect how long a coin is banned.

Stability Improvements

When Wasabi 2.0 was first released, Tor was under a network-wide attack that severely degraded its connection reliability. As a result, the coordinator cannot be too strict with bans to prevent DoS since honest users may inadvertently disconnect without signing.

In November 2022, benchmark statistics were measured showing coinjoins would succeed only 10% of the time on the first attempt, and slightly less than 50% of the time on subsequent attempts (known as “blame rounds”). With the release of v2.0.2.1 in December, these metrics improved to 15% success on the first attempt.

As a result of months of hard work by the Wasabi and Tor developers, updated statistics from October 2023 show that the overall success rate has more than doubled since the previous year, with over 50% of new rounds and over 80% of blame rounds succeeding. This consistency makes privacy convenient for patience minimalists who quickly tire of the soothing glow of the countdown timer.


Entering the Fee Market

The fee rate of the coinjoin transaction is another variable to account for while waiting for full privacy. The coordinator chooses the mining fee for the coinjoin round before users join, however, fee estimation is not a simple task. On average, a new Bitcoin block is mined every 10 minutes, but there is no way to predict exactly when one will be found or how many new transactions will outbid you until then. 

There are special considerations when choosing the fee rate for coinjoin transactions. Participants often pay several times more in mining fees for a coinjoin transaction compared to a regular payment since they can register multiple inputs and outputs. This increases the marginal advantage for sniping the lowest possible fee rate. In addition, coinjoins are not considered urgent because users are often sending coins to themselves and not to others, so whether or not the transaction is confirmed quickly is not as important because there is no risk that incoming funds will be double spent and lost.

Allowing coinjoin transactions to wait in the mempool also has an unintended privacy benefit. Since unconfirmed coins cannot be registered for new rounds, users who remix their outputs must wait additional time for their first coinjoin to be mined. By increasing the time period in between consecutive rounds, users are less likely to participate with the same users from their previous round.

Despite these advantages for choosing a low fee, there are also unique reasons for coinjoin transactions that would justify choosing a high fee as a precaution. Users who send a regular payment that gets stuck can easily use Replace By Fee (RBF) to increase its confirmation priority. However, since coinjoins require the cooperation of many users, the first fee is final. There is no way to replicate a higher fee replacement if even a single participant goes offline.

Another reason to prefer a higher fee for coinjoins is because they are disproportionately affected by transaction size limitations in Bitcoin Core’s mempool and block construction logic. Once a chain of transactions spending unconfirmed coins grows too large, nodes will ignore new transactions attempting to build on top of it.

Unfortunately, mining pools have not yet optimized to collect fees from coinjoin transactions. Miners only calculate the single highest paying descendant transaction package, which may cause them to overlook the confirmation of an extra profitable coinjoin with many spent child outputs.


Patience Preferences

Since it’s impossible to choose a fee that satisfies both the impatient and the thrifty at the same time, Wasabi has a feature called “Coinjoin time preference” to ensure that you don’t get hit with higher than expected mining fees.






If a coinjoin round requires a higher fee than the median of the previous day, week, or month, your client can be configured to skip that round and wait until fees drop or stabilize. This customization gives both spenders and savers flexibility without compromising their preferences or splitting the liquidity pool.

Setting a long coinjoin time preference makes it easy to handle the small coins that accumulate in your wallet as you send and receive transactions. Whenever the best deal on fees becomes available, your wallet will privately consolidate your UTXOs so you can readily spend them when fees increase again.

In conclusion, the combined speed provided by DoS fortification and smart savings from the coinjoin time preference feature has significantly improved Wasabi’s user experience. These advancements and tools have made privacy not only more convenient but also more cost-effective. Coinjoins have never been spicier, try Wasabi Wallet today and join the crowd.

The post Time is Money: DoS (Denial of Service) Fortification and Coinjoin Time Preference appeared first on Wasabi Wallet - Blog.

]]>
How Coinjoin Wallets Compare on Fees https://blog.wasabiwallet.is/what-are-the-different-fees-for-coinjoin-transactions/ Wed, 10 Jan 2024 07:40:52 +0000 https://blog.wasabiwallet.is/?p=3200 If you want to know the details of 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. 

The post How Coinjoin Wallets Compare on Fees appeared first on Wasabi Wallet - Blog.

]]>
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

The post How Coinjoin Wallets Compare on Fees appeared first on Wasabi Wallet - Blog.

]]>
Friends and Plebs Don’t Pay Wasabi Coinjoin Fees https://blog.wasabiwallet.is/friends-and-plebs-dont-pay-w/ Mon, 08 Jan 2024 14:56:31 +0000 https://blog.wasabiwallet.is/?p=3190 Have you met friends or fellow bitcoin users who wanted to participate in a coinjoin transaction but didn’t because of the fees? Read how our many fee exemption features can apply to […]

The post Friends and Plebs Don’t Pay Wasabi Coinjoin Fees appeared first on Wasabi Wallet - Blog.

]]>
Have you met friends or fellow bitcoin users who wanted to participate in a coinjoin transaction but didn’t because of the fees? Read how our many fee exemption features can apply to them so they never have to pay Wasabi coinjoin coordinator fees.

In this article, we’ll explain how Wasabi coinjoin fees work, how it differs from Wasabi Wallet 1 with Free Remixing, what Friends don’t pay means, the importance of accessibility in coinjoin transactions, what Plebs don’t pay means, why mining fees are never waived, and finally how to minimize mining fees in a high-fee environment.

Basic Explainer of Wasabi Coinjoin Fees

There are two types of fees in a coinjoin transaction: coordinator fees and network mining fees.

As with all bitcoin on-chain transactions, there’s a network mining fee proportional to the amount of space your inputs and outputs consume. This is also true for Wasabi coinjoin transactions; you pay for the space you use. For example, if you have two P2WPKH inputs and two P2WPKH outputs, your transaction size is 209 virtual bytes. If the fees are 50 sats / vbyte, you will pay 10450 sats in mining fees. 

In a coinjoin transaction, a coordinator (default is zkSNACKs) takes care of the complex communication between all the participants and receives a fee for the hefty task. This allows users to gain privacy. This fee is 0.3% of the total bitcoin you bring to a coinjoin round, so if you bring 3,000,000 sats (0.03 BTC), you will pay 9000 sats in coordinator fees.

Unlike Wasabi Wallet 1.0, where you paid coordinator fees on every transaction, since the 2.0 release you pay upfront on your first coinjoin transaction and then enjoy free remixing.

Pay Coordinator Fees Upfront: Free Remixing

It doesn’t matter if you participate in 1 or 100 coinjoin transactions with the same bitcoin, you will only pay coordinator fees for the first one. This allows you to enjoy additional privacy at a massively reduced cost.

How is this possible?

Whenever you join a coinjoin round, the coordinator can detect that your UTXOs (unspent transaction outputs) are from a previous Wasabi coinjoin, and therefore waives the coordinator fees for those coins. 

But what if the ownership of coins changes hands between two coinjoin transactions? Would the same apply? Yes, and this is what we call Friends don’t pay.

Friends Don’t Pay

The “Friends Don’t Pay” feature allows users to coinjoin as many times as they want for as long as they want at no additional cost other than the mining fee. 

This is great for liquidity as users are incentivized to coinjoin many times to improve their own privacy, making coinjoins better, faster and stronger for everyone! Anyone can coinjoin multiple times for 0% coordinator fees. 

Just send some previously coinjoined bitcoin to your friends and family members and watch them enjoy the benefits of acquiring privacy without having to pay coordinator fees. That must feel pretty awesome.

But wait, there’s another way to avoid paying the coordinator fees.

The Importance of Accessibility in Coinjoin Transactions

Before we get into the Plebs don’t pay feature, we want to reiterate our commitment to the accessibility of coinjoin transactions. We’re always working to improve on this front, whether it’s making the software more performant for low-bandwidth users as we did with the 2.0.4 release, or by adding the “Buy Anything Button” to allow you to purchase literally anything with your coinjoined bitcoin. 

The most important way to improve accessibility is to lower fees, and we’re doing that with Plebs Don’t pay.

Plebs Don’t Pay

If you participate in a coinjoin transaction with less than 1,000,000 sats (0.01 BTC), you will never pay any coordinator fees. Not a single sat. 

Wasabi is the only coinjoin protocol that waives coinjoin coordinator fees for users with small amounts of bitcoin,  often referred to as the bitcoin plebs in various bitcoin community channels. 

I know what you’re thinking, you’re almost convinced to coinjoin, but the high network mining fee environment makes you doubt. Yes, you will pay zero in coordinator fees but you will end up paying more in mining fees. 

Well, read on to learn why mining fees are crucial and shouldn’t be waived, and how to minimize your coinjoin transaction mining fees.

Why Mining Fees Should Never Be Waived

By enforcing mining fees for all coinjoin participants, we ensure an economic cost for everyone and collapse the opportunity for sybil attackers.

What is a Sybil attack? 

The U.S. National Institute of Standards and Technology defines it as: “A cybersecurity attack wherein an attacker creates multiple accounts and pretends to be many persons at once.”

Coinjoins work because many participants join together to form collaborative bitcoin transactions. The privacy gain is strictly correlated to the diversity of participants, and a Sybil attack in this context means that an attacker can fool others into believing that they are many different people, when in fact they’re only one.

This could theoretically be taken to the point where you think you’re with dozens of participants, when in fact you’re with only one attacker. This could easily compromise your privacy.

By never waiving network mining fees, we ensure that Sybil attacks have a cost that will deter potential malicious attackers.

Now for something practical…

How to Minimize Mining Fees

When you set up a wallet on Wasabi, you will be asked to choose a coinjoin strategy between Minimize Costs, Maximize Speed, and Maximize Privacy. The first two strategies aim for an anonymity level of 5, and the last one is a random number between 50 and 100. You can also customize the parameters.

The Minimize Costs strategy will ensure that you only participate in coinjoins that take place at times of the week when there’s less pressure on the network mining fee market, so you can minimize the fees you pay.

You can change coinjoin strategies at any time in your coinjoin settings.

Conclusion

The next time a friend wants to coinjoin but is hesitant because of the fees involved, be sure to point them to this blog article so they can understand the many ways they can pay zero coordinator fees and minimize their mining fees. 

No doubt he’ll be grateful to you!

The post Friends and Plebs Don’t Pay Wasabi Coinjoin Fees appeared first on Wasabi Wallet - Blog.

]]>
What is the Difference Between a Passphrase and a Password? https://blog.wasabiwallet.is/what-is-the-difference-between-a-passphrase-and-a-password/ Tue, 12 Dec 2023 10:39:51 +0000 https://blog.wasabiwallet.is/?p=3156 In this article, we will explain what BIP39 is, the benefits and tradeoffs of passphrases, how to properly back them up, and how they differ from regular passwords.

The post What is the Difference Between a Passphrase and a Password? appeared first on Wasabi Wallet - Blog.

]]>
When taking care of your bitcoin self-custody, the last thing you want is to lose access to your wallet because you confused the terms and didn’t back up properly. Let’s make sure that doesn’t happen by answering a few questions.

What is a bitcoin passphrase? What is a password? What is the difference between the two?

A BIP39 passphrase is an additional layer of protection for your bitcoin wallet; it acts as the 13th word to your 12-word seed phrase, or the 25th word if you have a 24-word seed phrase. If you lose your passphrase, you will lose access to your wallet and won’t be able to recover your funds.

A bitcoin wallet password is a way to lock your wallet application, and in the case of Wasabi Wallet, it’s the same as a BIP39 passphrase. However, in other wallets, it will only lock you out of the wallet, but you will be able to recover with your seed phrase without the need for the password.

In this article, we will explain what BIP39 is, the benefits and tradeoffs of passphrases, how to properly back them up, and how they differ from regular passwords.

What is BIP39?

BIP39 is a bitcoin improvement proposal from 2013 that revolutionized the way bitcoin wallets work. Here’s the description straight from the BIP:

“This BIP describes the implementation of a mnemonic code or mnemonic sentence — a group of easy-to-remember words — for the generation of deterministic wallets.”

Today, BIP39 is the standard for how bitcoin wallets work. You create a wallet and you get a set of words, often 12 or 24, and if you back up that property, you can retrieve your wallet anywhere, anytime.

But what if someone other than you finds your seed phrase backup? They would have instant access to your money, and you wouldn’t be too happy about it.

What can be done to solve this problem?

Passphrases to the Rescue

To add an extra layer of protection to your wallet, you can add a passphrase to protect your seed phrase. This passphrase can be anything you want; any combination of alphanumeric and special characters of any length.

When you set up Wasabi Wallet, you’ll be asked to enter a passphrase. This is a BIP39 passphrase, and you should take the time to understand that you will need this passphrase every time you want to use your wallet, and if you lose it, you will lose access to your funds.

As long as you understand and accept the tradeoff of losing access to your funds if you lose your passphrase, you’re ready to use it. Just make sure you back it up properly.

How to Properly Backup a Passphrase?

First of all, remember why you’re using a passphrase in the first place: to protect your seed phrase. This means that the first step to properly handling your passphrase backup is to keep it separate from your seed phrase backup.

Then, you should test your passphrase and your full wallet backup before sending a significant amount of money to your wallet. Also, make sure you’re comfortable with the recovery process. 

Some people may tell you that you shouldn’t write your passphrase down anywhere and that you should memorize it, but they’re dead wrong. You should never make your memory your single point of failure, unless you have no choice, like crossing a border in a war zone.

So is there a difference between passphrases and passwords?

The Difference Between a Passphrase and a Password

The answer is that it depends on the wallet. In the case of Wasabi Wallet, there’s no difference between a passphrase and a password, they are used interchangeably.

However, in many other wallets, such as Blue Wallet, a password is not part of your wallet, it’s just a way to protect access to your application. This means that if you restore your wallet from your seed phrase backup, you won’t be asked for your password to access your funds, and you will be able to set a new password.

Conclusion

In this article, we explained what BIP 39 is, how passphrases help protect your seed phrase, how to properly back them up and what is the difference between a passphrase and a password.

Bitcoin self-storage isn’t too difficult, but you do need to take the time to familiarize yourself with the basics and feel comfortable with the recovery process. We recommend that everyone take the time to properly test their wallet backup so that they are not nervous when the time comes to do it for real.

The post What is the Difference Between a Passphrase and a Password? appeared first on Wasabi Wallet - Blog.

]]>
Explaining Wasabi Wallet’s Tor Implementation https://blog.wasabiwallet.is/explaining-wasabi-wallets-tor-implementation/ Tue, 24 Oct 2023 08:12:14 +0000 https://blog.wasabiwallet.is/?p=3098 This article will define what Tor is, how Wasabi Wallet implements Tor exactly, what are the operations that require an immediate circuit update, why the coordinator doesn't use an onion service anymore, and how Conflux could be a future solution to improve reliability.

The post Explaining Wasabi Wallet’s Tor Implementation appeared first on Wasabi Wallet - Blog.

]]>

Connecting to the internet through Tor is a core component of a bitcoin privacy wallet. Along with block filters, it’s the answer to bitcoin network privacy.

As expected, Wasabi Wallet comes with Tor bundled in and enabled by default (you can opt out, but it’s not recommended), but how exactly does Wasabi Wallet implement Tor?

Wasabi Wallet makes all of its requests through Tor, but it alternates the connection (circuit) modes so that for super-private things like coordinating a coinjoin, its circuit is updated after each operation. This allows the user to have privacy from both the coordinator, the Bitcoin network and the Tor network.

This article will define what Tor is, how Wasabi Wallet implements Tor exactly, what are the operations that require an immediate circuit update, why the coordinator doesn’t use an onion service anymore, and how Conflux could be a future solution to improve reliability.

First, it’s important to understand that using the Internet without Tor (or alternative protocols) reveals your IP address to the server you’re connecting to. The goal is to protect a user’s IP address from their Internet peers and the public.

How Does Tor (The Onion Network) Work?

Tor is a free and open source software that enables anonymous communication for online activities by encrypting and routing Internet traffic through a network of servers, making it difficult to trace the origin or destination of data.

In other words, Tor is a peer-to-peer network that anyone can join to hide their IP address from the destination server. Here’s a simple illustration of how Tor works:

Tor is used in Wasabi Wallet for all communication purposes by default, i.e. to connect to the bitcoin network to download blocks and broadcast transactions, and to the coinjoin coordinator to receive block filters and the state of the coinjoin rounds when loading the wallet, and most importantly, for all the communication steps of the coinjoin transaction such as input selection, output selection, transaction signing. (Read about how a coinjoin transaction works in detail). 

Now let’s take a closer look at Wasabi Wallet’s Tor implementation. 

How Exactly Does Wasabi Wallet Implement Tor?

First off, we want to make sure that all communication happens through Tor. Each time we communicate we create an HttpClient (software used to send and receive responses from a server) and we set it up with Tor.

In addition, Wasabi enables Tor’s control port to manage and switch connection (circuit) modes. There are three circuit modes:

  • For DefaultCircuit, on every session, we set up a default circuit that we will use when we don’t use other modes, usually for operations that are not too sensitive. 
  • For SingleCircuitPerLifetime, we create a new circuit just for this HttpClient, which we will reuse throughout the lifetime of the component that created the HttpClient.
  • NewCircuitPerRequest is the most private mode. We use it when we want each request to have its own unique circuit, such as during the coinjoin coordination process.

 It’s important to note that Tor circuits are slow and hard to create, which is why we try to avoid creating new ones when it’s not necessary. Here’s an example to understand better circuit mode management.

When a component needs to communicate on the Internet, it requests a new HttpClient configured with the mode it needs. When we use the RoundStateUpdater (to get the state of the coinjoin round), privacy is not critical. This is because every Wasabi client polls this endpoint, whether it’s actively participating in a coinjoin or not. 

Since this query does not reveal client uniqueness, we create the HttpClient for the component with the SingleCircuitPerLifetime mode.

Now what are the operations that require the highest level of privacy with the circuit mode NewCircuitPerRequest?

What are the Operations that Require Tor Circuit Updates (NewCircuitPerRequest) in Wasabi Wallet?

As mentioned above, Tor is used for all communication when enabled, and a Wasabi Wallet client only communicates with Bitcoin Network peers and the coinjoin coordinator server. Let’s look at the operations that require circuit updates, starting with the coinjoin coordinator process.

For the coinjoin communication, it works separately in two parts:

  • Inputs Registration + Inputs Confirmation phases: In this case, it makes sense to use one circuit for all requests related to one input, so we use the SingleCircuitPerLifetime mode, and we create a new HttpClient per input.
  • Everything else: For the rest of the critical phase, we shouldn’t link any requests with each other. So we can use a single HttpClient, but we have to use the NewCircuitPerRequest mode.

For Bitcoin network communication, we use NBitcoin and its own Tor implementation so it works very differently. To protect privacy additionally on the block download step, we disconnect from a network peer every time we download a block. 

We’ve explained in detail how the Wasabi Wallet client Tor implementation works, now let’s answer a common question regarding the abandoned use of an onion service for the coordinator server.

Why The Wasabi Coordinator Doesn’t Use an Onion Service Anymore

An onion service is a server configured to only receive incoming connections through Tor, providing privacy and censorship resistance to servers by bypassing DNS.

It used to be the case that the coordinator would run an onion service and clients would connect to it. However, this is no longer the case due to reliability issues inherent in onion services. In addition, the coordinator server doesn’t need privacy from the public so there’s not too much incentive. 

For Wasabi’s coinjoin coordination process to work properly, the standard deviation of the request time must be small. Each request has to happen in a few seconds, and this time frame can’t vary much from request to request. Reliability is a major issue for Tor.

However, a solution seems to have arised…

Conflux as a Potential Reliability Solution for Tor

Conflux is a new Tor project that aims to solve Tor’s inherent reliability problems. If you need bandwidth reliability: you use Conflux, and it duplicates your request and sends each one through different circuits. Since reliability failure is a low-probability event, it’s extremely unlikely to happen with two different requests (e.g., 0.1 * 0.1 = 0.01),

Since Wasabi’s use of Tor varies depending on the action, sometimes we would use Conflux and sometimes we wouldn’t. Unfortunately, this isn’t possible with our current implementation. An alternative implementation called Arti would allow us to solve the Conflux management problem.

Conclusion

In this article, we’ve explored how Tor works, how it’s implemented in Wasabi Wallet through the alternative circuit modes depending on the action, which operations require the most private mode, why the coordinator no longer uses an onion service, and how Conflux is a solution to the reliability issues inherent in Tor. 

This article, among other technical content, demonstrates that Wasabi Wallet is the superior bitcoin wallet for network privacy. To learn more about all the benefits of Wasabi Wallet, check out the Coinjoins.org review

The post Explaining Wasabi Wallet’s Tor Implementation appeared first on Wasabi Wallet - Blog.

]]>
Announcing Private Bitcoin for Enterprises with a New Coinjoin API https://blog.wasabiwallet.is/coinjoin-api-pioneering-bitcoin-privacy-for-enterprises/ Thu, 12 Oct 2023 11:50:05 +0000 https://blog.wasabiwallet.is/?p=3091 Now, with a simple Coinjoin API recently announced, collaborative bitcoin transactions are accessible to anyone, including companies that want to add powerful and robust privacy features to their bitcoin products, such as wallets, brokers, custodians and more

The post Announcing Private Bitcoin for Enterprises with a New Coinjoin API appeared first on Wasabi Wallet - Blog.

]]>
All bitcoin transactions are public and easily traceable by anyone. Nothing new here. Businesses and individuals may find friction in this lack of privacy. In traditional financial services, protecting commercial and personal interests from the public is common, so Bitcoin should be no different.

As software, Bitcoin is programmable, and its transactions can be made collaborative to protect users from leaking sensitive transaction details. Coinjoins are bulk bitcoin transactions that do just that. Coinjoins allow users to prevent personal information leaks on the public Bitcoin network, reclaiming their privacy. Users can protect their transaction history while retaining the ability to choose who to share confidential financial information with.

Coinjoins for Everyone, Anywhere

For a long time, coinjoin protocols have been difficult to develop and implementations have been difficult to deploy and maintain, with many performance, reliability and efficiency quirks. 

Now, with a simple Coinjoin API recently announced, collaborative bitcoin transactions are accessible to anyone, including companies that want to add powerful and robust privacy features to their bitcoin products, such as wallets, brokers, custodians and more. Over the past five years, Wasabi Wallet has shown that coinjoins can bring privacy to a large number of consumers without any tradeoffs on security or sovereignty. With an ever-growing interest in recording and analyzing public bitcoin transactions, bitcoin companies must now find new ways to protect the privacy of their customers as they move to a Bitcoin standard. The Coinjoin API makes this available to the enterprise market and increases the value proposition for Bitcoin itself. 

Anonymity loves company, and that’s why we love that anyone can use our Coinjoin API to join the privacy party of our existing users. WabiSabi is efficient, fast, and flexible, where alternative clients can pioneer cutting-edge features. BTCPayServer users can efficiently batch multiple payments in a single coinjoin, and Trezor Suite users are the first to enjoy hardware wallet security of their private keys in coinjoins. This freedom to innovate on the edges will let a thousand flowers bloom” – Max Hillebrand, CEO at zkSNACKs and Wasabi Wallet contributor. 

With over a million devices sold, Trezor, one of the world’s most popular bitcoin hardware wallet manufacturers, has already integrated the Coinjoin API developed by zkSNACKs earlier in 2023. 

“Our mission is strengthening the power and independence of the individual. Coinjoin is an essential piece in the privacy puzzle and we try to make it as simple as possible. Now anyone can reclaim their privacy without compromise on security.” – Hynek Jína, Head of Development at Trezor

As a self-hosted bitcoin payment processor, BTCPay Server has integrated the WabiSabi coinjoin protocol into a plug-in, making this feature available to all of its merchants, who can now even run their own coinjoin coordinator infrastructure. 

BTCPay Server has always championed privacy-centric solutions. When the WabiSabi protocol became production-ready, it was a no-brainer for me to build an option to incorporate it. The flexibility of WabiSabi is astounding, allowing me to innovate by using a privacy solution as a scaling solution. Now, merchants can schedule and batch their bitcoin payments to be broadcast through coinjoins, hitting two birds with one stone. BTCPay Server even allows you to effortlessly integrate WabiSabi coinjoins into your operations through its extensive API. And with the upcoming payment protocol, a service provider will be able to offer the most private financial settlement experience possible to its customers, at no extra cost.”Kukks, BTCPayServer

In the early Wasabi Wallet 1.0 version, Cyphernode and Chaincase had already successfully integrated the API to build clients with new functionalities such as multi-wallet management for the former and deploying on the iOS platform for the latter. Even with these early innovations, we’re still at the beginning of scaling accessible Bitcoin privacy to millions of users, and the Coinjoin API is a new product to help bitcoin businesses on that path forward. As new partners integrate with the zkSNACKs Coinjoin API, liquidity improves, which provides better service to all existing users. In other words, coinjoins are social and benefit from network effects to improve the level of privacy for all users with an optimal level of speed, cost and ease of use. 

Existing bitcoin companies can leverage new opportunities to monetize a high-traffic wallet or broker through an affiliate program with revenue sharing. Offering an additional feature to existing users creates new income diversifying revenue streams, while potentially attracting new users by providing state-of-the-art Bitcoin privacy features. With regular user data breaches targeting bitcoin exchanges, brokers and lenders, companies can now mitigate the impact on their customers by preventing address clustering and transaction tracking. Companies can also fully comply with local and regional consumer privacy laws by protecting users’ personally identifiable information, preventing non-consensual sharing of user data on the public Bitcoin network. 

If you are a Bitcoin company interested in joining the affiliate program and learning more about the Coinjoin API, please get in touch with zkSNACKs at [email protected]

The post Announcing Private Bitcoin for Enterprises with a New Coinjoin API appeared first on Wasabi Wallet - Blog.

]]>
Unpacking Wasabi Wallet’s Power Feature: The Headless Daemon https://blog.wasabiwallet.is/unpacking-wasabi-wallets-power-feature-the-headless-daemon/ Wed, 13 Sep 2023 15:36:30 +0000 https://blog.wasabiwallet.is/?p=3074 Think of it as your wallet but on a diet. It uses fewer resources like CPU, GPU, memory, and bandwidth, allowing you to run Wasabi Wallet unobtrusively in the background.

The post Unpacking Wasabi Wallet’s Power Feature: The Headless Daemon appeared first on Wasabi Wallet - Blog.

]]>
A Builder’s Best Friend

Wasabi 2.0 has redefined the Bitcoin privacy world with the introduction of the WabiSabi coinjoin protocol. This does not require sacrificing any of the rich features offered by the battle-tested 1.0 version, so that’s why we’re excited to reintroduce the Headless Daemon in Wasabi Wallet v2.0.4. This powerful tool offers a lighter, more efficient way to manage your Bitcoin wallet. No more worrying about resource consumption — the daemon’s got you covered.

What is the Headless Daemon?

Normally, you’d interact with Wasabi Wallet through our graphical user interface (GUI). While user-friendly, the GUI can sometimes demand a lot of your computer’s resources. The headless daemon changes all that. With this new feature, you can interact with your wallet via a simple command line interface. Think of it as your wallet but on a diet. It uses fewer resources like CPU, GPU, memory, and bandwidth, allowing you to run Wasabi Wallet unobtrusively in the background.

Why You’ll Love It

  • Developer-Friendly: Before making new features live on the GUI, developers can test them out via the RPC interface.
  • Always Ready: If you keep it running all the time, there’s no need to worry about synchronizing your wallet every time you wish to use it.
  • Easy Configuration: No need to navigate through config files. You can override settings with a simple command.
  • No Compromises: Enjoy all the features you love without any tradeoffs when switching from the GUI to the daemon.

How to Run the Headless Daemon

Installed Package

Linux Users

wassabeed –wallet=WalletName –jsonrpcserverenabled=true

macOS Users

cd /Applications/Wasabi\ Wallet.app/Contents/MacOs

./wassabeed –wallet=WalletName –jsonrpcserverenabled=true

Windows Users

cd C:\Program Files\WasabiWallet

wassabeed –wallet=WalletName –jsonrpcserverenabled=true

Building from Source

If you prefer to build from source, you can navigate to the WalletWasabi.Daemon directory and run:

$ dotnet run –wallet=WalletName –jsonrpcserverenabled=true

Examples to Get You Started

1. Connect to Testnet

$ wassabeed –network=testnet

2. Run on Testnet with Additional Configurations

$ wassabeed –usetor=false –datadir=”$HOME/temp/wasabi-1″ –network=testnet –jsonrpcserverenabled=true –blockonly=true

3. Open Multiple Wallets

$ wassabeed –wallet=AliceWallet –wallet=BobWallet

4. Check Daemon Version

$ wassabeed –version

Wasabi Daemon 2.0.4

Wrapping Up

With the headless daemon, power users can easily integrate Wasabi’s unmatchable privacy into their project workflow. Get ready to experience a more streamlined, resource-friendly way of managing your Bitcoin. Upgrade to Wasabi version 2.0.4 today and give the headless daemon a spin!

The post Unpacking Wasabi Wallet’s Power Feature: The Headless Daemon appeared first on Wasabi Wallet - Blog.

]]>
Turbosync: Wasabi Wallet’s Loading Time Reduced by 90% https://blog.wasabiwallet.is/turbosync-wasabi-wallets-loading-time-reduced-by-90/ Wed, 23 Aug 2023 08:55:30 +0000 https://blog.wasabiwallet.is/?p=3036 With the 2.0.4 release, Turbosync is introduced in Wasabi Wallet to reduce the load time by up to 90%. We did this with accessibility in mind so that even low-bandwidth users can use Wasabi with little friction.

The post Turbosync: Wasabi Wallet’s Loading Time Reduced by 90% appeared first on Wasabi Wallet - Blog.

]]>
Introduction

As a Wasabi Wallet user, you want your bitcoin activity to be private. Coinjoins are great for that, but they’re not the complete solution. To do bitcoin privacy right, you need to solve both blockchain privacy, which coinjoins do, and network privacy. How does Wasabi Wallet handle the latter? We implement block filters (BIP 157-158) as a solution to download bitcoin transaction data without compromising network privacy.

One of the biggest challenges with this implementation is that users have to download a lot of data compared to other light client solutions. This results in longer load times when restoring or initializing a wallet on Wasabi. Fortunately, the hard work of the contributors has resulted in an optimization.

Turbosync has now been introduced in the 2.0.4 release of the Wasabi Wallet and reduces load times by up to 90%. We did this with accessibility in mind so that even slow internet users can use Wasabi with less friction.

What is Turbosync and How Does it Reduce Wasabi Wallet’s Load Time by Up to 90%?

This release optimizes the filter-checking process to reduce wallet loading times by 90% thanks to code cleanup and a clever key prioritization process dubbed “Turbosync”. With Turbosync, internal addresses that have already been used are not checked for coins in new blocks until after unused addresses have been checked first. Filter performance has been further improved by storing them in a SQLite database instead of a plain text file, reducing disk space requirements by about 1 GB and increasing resilience to file corruption.

To better communicate this topic, we first need to take a quick look at the challenges of network privacy in bitcoin, block filters as an abstract solution, Wasabi’s specific block filter implementation, and the details of Turbosync along with the fixes in the 2.0.4 release.

The Challenges of Network Privacy in Bitcoin

Network privacy in Bitcoin is an essential piece of the puzzle to solve. The goal is to connect to the Bitcoin network privately in order to track your wallet’s addresses and broadcast transactions. As you may know, running and using a Bitcoin node is the best thing you can do because you’re part of the network and you don’t need any intermediaries. Read this article to learn more about the benefits of running a bitcoin node.

While this is easy to say, it is harder to accomplish since running a bitcoin node requires a lot of bandwidth and disk space. It also takes a long time to set up, from a few hours to a few weeks (usually 12-36 hours). Light wallets are inevitably the standard for their ease of use, which is something even Satoshi acknowledged on the Bitcoin White Paper, as SPV (Simple Payment Verification). 

The Privacy Problem of Light Wallets

There are two main approaches to network connectivity for light wallets, SPV and API (Application Specific Interface). Both have inherent privacy flaws that this section will explore. 

SPV was a terrible design because it couldn’t validate transactions, it wasn’t private, and it wasn’t fast. Bloom Filters were added to SPV wallets in BIP37, as an effort to increase privacy. However, this was debunked in the following years because bloom filters download specific transactions, which makes it straightforward to deduct which coins belong to the user’s IP address.

API wallets were introduced as a way to make network connectivity fast. They work by connecting to a central server via an API. Examples include BitPay’s wallet, Mycelium, and the Electrum server framework. This centralized approach means that users’ transaction data can be logged and linked to their IP address. Again, there are privacy limitations with Bitcoin network connectivity.

Doesn’t Tor Solve This?

It partially solves this. Yes, Tor (The Onion Network) is software that allows for anonymous communication by encrypting and routing internet traffic through a network of servers, making it difficult to trace the origin or destination of data. This means that it hides your IP address from the SPV network peers or the API server. However, all your transactions and coins are still linked to each other, which remains a big privacy problem. 

Tor is bundled with Wasabi Wallet and is enabled by default. The remaining part of the network privacy problem is solved by Block Filters.

Block Filters as a Solution for Bitcoin Network Privacy

Block Filters were introduced in BIP 157 and BIP 158 as a privacy improvement over Bloom Filters. Block filters compress block data to help wallets like Wasabi receive transactions from peers without compromising privacy by downloading specific blocks instead of looking up single transactions.

With block filters, full nodes create filters for each block, and light clients fetch these filters. With bloom filters, the light client creates and sends the filter to the full nodes. There’s a key difference in the direction of filter creation.

Although filters consume bandwidth and storage, keep in mind that this additional consumption of network and hardware resources is nowhere near those of a full bitcoin node. Only ≈3GB of filters and blocks are required to sync a wallet instead of 500GB of block history. 

How does this work in Wasabi’s specific context?

Wasabi Wallet’s Block Filter Implementation

Wasabi’s coinjoin and privacy features would not be complete without a block filter implementation. There’s three steps for wallet synchronization: Filter Download, Filter Scanning and Block Download.

Filter Download 

Implemented differently in Wasabi Wallet than on the BIPs because they’re downloaded from the Wasabi backend coordinator server, through Tor. This takes a while the first time, but it’s much faster on the next occasions since it only has to catch up to the newest blockchain state.

Filter Scanning

When you load a wallet, it checks if the generated addresses within the gap limit hit against a block filter. If a transaction of yours is in a block, then the corresponding filter will always be hit, and the wallet will know this is a relevant block for you. There’s a small chance of a false positive where the filter matches, but the block actually does not contain a transaction.

Block Download

When a block filter hits, either a true match or a false positive, the wallet will download it. If you have a Bitcoin full node connected, then it will fetch the verified block locally. If not, then Wasabi will connect to a random Bitcoin P2P node with a new Tor identity, and request only this block for download. In this step, your Wasabi behaves like any other full node, and cannot be differentiated. Once every block wanted is downloaded, the wallet load has finished and your wallet dashboard appears.

It can be annoying for users to be presented with the wallet load screen and having to wait for this to complete before using their wallet. To speed things up, our software contributors noticed that some improvements could be brought to this implementation and Turbosync was born.

Turbosync and 2.0.4 Release Improvements

Turbosync is a feature introduced in Wasabi Wallet’s 2.0.4 release that changes how filter scanning is done in order to present the user’s dashboard as fast as possible. It operates with the heuristic that internal keys (coinjoin outputs or change addresses) should only be used to receive coins once and to spend. As soon as an address (part of the internal keys) hits a block filter twice, it has received coins and then spent them, we skip checking this address and we move on to the next one. 

Once all addresses have been checked and the required blocks are downloaded, the wallet load screen will change to present the user’s dashboard. However, filter scanning will continue in the background and the skipped addresses will be checked. In the case that some additional funds have been received on those addresses. Users in that edge case would see their balance update automatically after some time. Once done, the message “Wallet is fully synchronized.” will be written to the logs file to indicate that the verification process has finished.

Wallets that coinjoin frequently will benefit the most from this feature, as the vast majority of their addresses will be skipped. It’s important to remember that false-positives happen and they lead to unnecessary additional load time. Turbosync reduces the amount of false-positive blocks downloaded before the user’s dashboard appears. 

TurboSync feature shouldn’t cause any issues, but you might want to disable it to debug potential issues with the synchronization of your wallet. In that case, go to your wallet file (search for `Wallet Folder` using Wasabi’s search bar then open the file corresponding to your wallet) and set `UseTurboSync` to `false`.

What other improvements were made to the Block Filter implementation?

Filter performance improved even more by storing them in an SQLite database instead of a plaintext file, reducing disk space requirements by about  1 GB and increasing resilience against file corruption. This is a standard software development practice that is applied to the block filter implementation, but is not related to the steps for wallet synchronization.

Conclusion

In this article, we explained the network privacy problem of bitcoin light wallets and how both SPV and API wallets fail at solving this. We explain how Tor is part of the solution, but how Block Filters are the remaining piece of the puzzle to solve this problem. We then break down how block filters work in an abstract format, but also how Wasabi Wallet implements it. Finally, Turbosync is introduced in the 2.0.4 release with some other improvements such as the introduction of an SQLite database for block filter storage. Together, both of these changes can reduce Wasabi Wallet’s load time by up to 90%. 

The post Turbosync: Wasabi Wallet’s Loading Time Reduced by 90% appeared first on Wasabi Wallet - Blog.

]]>
RBF and CPFP: UX Survey with Screenshots https://blog.wasabiwallet.is/ruser-experience-of-replace-by-fee-and-child-pays-for-parent-in-bitcoin-wallets/ Tue, 22 Aug 2023 14:23:12 +0000 https://blog.wasabiwallet.is/?p=3014 How do you scale a blockchain? You don't. Block space is inherently limited, and everyone making Bitcoin transactions competes for it. RBF and CPFP are some of the most prominent tools in the toolbox of a user for the block space scarcity competition.

The post RBF and CPFP: UX Survey with Screenshots appeared first on Wasabi Wallet - Blog.

]]>
User Experience of Replace By Fee and Child Pays For Parent in open source, non-custodial desktop Bitcoin wallets.

How do you scale a blockchain? You don’t. Block space is inherently limited, and everyone making Bitcoin transactions competes for it. RBF and CPFP are some of the most prominent tools in the toolbox of a user for the block space scarcity competition.

Wallets

I have compiled a list of non-custodial Bitcoin wallets for desktop that are actively being developed and are open source. Please note that I have excluded those that require a hardware wallet since I don’t have access to them in my current location (Ledger Live, Specter, Trezor Suite.)

RBF

RBF, which stands for Replace By Fee, is a feature that allows modification of an unconfirmed Bitcoin transaction to include a higher fee, thus confirming sooner. It is less well-known, but this feature also allows for the cancellation of unconfirmed Bitcoin transactions.

CPFP

CPFP, short for Child Pays For Parent, is also a handy feature that accelerates a transaction by spending one of its outputs with a high fee. This results in a child transaction, paying for the parent transaction. CPFP is especially helpful when we cannot use RBF, such as when receiving a transaction and not owning all the inputs involved.

Speed Up Receiving Transaction

Bitcoin Core

N/A

Electrum

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Nunchuk

N/A (They claim it’s available on their blog, but I couldn’t find it, so it seems it is only the case with their mobile version.)

Sparrow

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Wasabi Wallet

Step 1

Step 2

Step 3

Step 4

Speed Up Sending Transaction

Bitcoin Core

Step 1

Step 2

Step 3

Electrum

Step 1

Step 2

Step 3

Step 4

Nunchuk

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Sparrow

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Wasabi Wallet

Step 1

Step 2

Step 3

Step 4

Cancel Transaction

Bitcoin Core

N/A? The option appears to be greyed out for me.

Electrum

Step 1

Step 2

Step 3

Step 4

Nunchuk

N/A

Sparrow

Step 1

Step 2

Step 3

Step 4

Step 5

Step 6

Wasabi Wallet

Step 1

Step 2

Step 3

Step 4

The post RBF and CPFP: UX Survey with Screenshots appeared first on Wasabi Wallet - Blog.

]]>
Free Transactions from Being Stuck in the Mempool https://blog.wasabiwallet.is/free-transactions-from-being-stuck-in-the-mempool/ Mon, 21 Aug 2023 15:02:19 +0000 https://blog.wasabiwallet.is/?p=3047 We’ve packed Wasabi Wallet version 2.0.4 with highly requested features and a bundle of performance optimizations that drastically speeds up wallet load time, frees transactions from getting stuck in the mempool and make life easier than ever for privacy-conscious Bitcoiners. 

The post Free Transactions from Being Stuck in the Mempool appeared first on Wasabi Wallet - Blog.

]]>
Budapest, Hungary, August 21st, 2023.

Tired of waiting for transaction confirmations? So are we! Much time has been spent trying to solve this ubiquitous issue. As a result, we’ve packed Wasabi Wallet version 2.0.4 with highly requested features and a bundle of performance optimizations that drastically speeds up wallet load time, frees transactions from getting stuck in the mempool and make life easier than ever for privacy-conscious Bitcoiners. 

Key upgrades include transaction speedup with RBF and CPFP, privacy warnings when sending transactions, and a headless daemon for advanced users who prefer using their keyboard instead of their mouse. Tasks running in the background now take even less time with improvements made to coinjoin output efficiency and wallet synchronization speed.

Since the last release four months ago, the amount of progress is mind-blowing. Now Wasabi is even faster, more private, and easier to use. The contributors have really outdone themselves this time.” ~ Max Hillebrand, CEO at zkSNACKs and Contributor to Wasabi Wallet 

Don’t Float in the Mempool

Unpredictable gaps of time between blocks often lead to users overpaying on fees for urgent transactions to avoid getting stuck in the mempool below competing bids. Wasabi’s new transaction speedup feature eliminates this risky gamble so users always win. Incoming funds can now be secured quickly with Child Pays For Parent (CPFP) to self-spend an unconfirmed UTXO, and outgoing transactions can use Replace By Fee (RBF) to increase confirmation priority or cancel the payment entirely. In addition to these flexible new features, clients now adapt to high mempool fees and never create small value coinjoin outputs that would be uneconomical to spend. Coinjoin reliability was reinforced further on the coordinator side with more accurate fee rate measurements and a robust transaction broadcasting process.

Turbosync Drastically Reduces Wallet Load Times

Wasabi clients use compact block filters to privately synchronize a wallet’s balance with the Bitcoin network. Block filters allow light clients to download only the blocks that contain their transactions instead of downloading every block like a fully validating node. This release optimizes the filter-checking process to reduce wallet loading times by 90% thanks to code cleanup and a clever key prioritization process dubbed “Turbosync”. With Turbosync, internal addresses that have already been used are not checked for coins in new blocks until after unused addresses have been checked first. Filter performance improved even more by storing them in an SQLite database instead of a plaintext file, reducing disk space requirements by about 1 GB and increasing resilience against file corruption.

Privacy Warnings and Spending Suggestions

New Privacy Warnings present users with one-click fixes if they are attempting to construct a transaction that spends nonprivate funds or creates change. Notifications are provided when consolidating more than 10 UTXOs or spending unconfirmed funds, allowing users to avoid potential mistakes without restricting intentional usage.

More Privacy, Less Blockspace

The amount decomposer was refined to make the most effective use of scarce block space so that whales who set a high anonymity score target now need fewer coinjoin rounds to reach 100% privacy. The amount of outputs a client can create in a round has been increased from 8 to 10, and decompositions that produce change outputs are now rarely chosen. The occurrence of non-private coinjoin “toxic” outputs is reduced even further to improve coinjoin efficiency. Adjustments to the anonymity score calculator and default settings additionally reduce the amount of coinjoining required before all coins are considered private. The anonymity score target of the “Maximize Privacy” coinjoin strategy setting was reduced from a random value between 50-100 to a less conservative range of 27-76, which brings the behavior closer in line with the two efficiency-based strategies.

Headless Daemon

More experienced users can directly interact with the core features of the wallet through an RPC (Remote Procedure Call) interface making it easy for developers to customize their experience and build features that are not available in the GUI version. This release bundles the Daemon, an executable called ‘wassabeed’ that runs the wallet without the graphical interface. The wallet can be run in the background by using the RPC interface allowing users to coinjoin, see their balance, and perform every other function of the wallet without the resource consumption of the graphical interface.

Other Features

  • QR code scanning for Linux to copy payment addresses
  • Improved Tor behavior
  • Hardware Wallet Interface updated to v2.2.1
  • Decoupling of the user interface for better testing and alternate client support
  • Separation of WabiSabi cryptography library for compatibility with other projects
  • Sunset of Wasabi Wallet 1.0 zerolink coinjoin coordination

About Wasabi Wallet

Reclaim your privacy with Wasabi Wallet, a free and open-source bitcoin wallet with built-in coinjoins. Coinjoins are collaborative bitcoin transactions that enable cash-like privacy features for bitcoin.

Download Wasabi Wallet here .

The post Free Transactions from Being Stuck in the Mempool appeared first on Wasabi Wallet - Blog.

]]>