What is the counter measure against dust attack, in case somebody tries to deanonymize me?

  1. Is there a possibility how to prevent somebody to send you intentional small dust, so that he can track your UTXOs?

  2. I think there is no counter measure to 1. So if 1 already happens, how to deal with this in the most possible clean way and with as little leaked information as possible?

2 Answers 2


A deanonymizing dust attack works by sending dust to large amounts of addresses. The assumption is that when people send transactions/perform consolidations in the future, dust from multiple addresses will be grouped into a single transaction, thus revealing many addresses controlled by a single entity, since the dust would be swept in a single tx.

(this is somewhat of a simplification, since most parties interested in performing such attacks will also be using other data to group together multiple independent txs).

The best way to prevent against this attack is to:

  1. Never spend dust in a transaction that consumes inputs from addresses that have not previously been linked by a transaction.
  2. Don't spend dust at all.

This will lead to some utxo bloat, but if you are reusing your addresses, you can spend the dust when spending another utxo from the same address. If you are not reusing addresses, simply never spend it.

Some wallets, such as the Samourai Wallet (no affiliation), provide an option to mark dust as unspendable. For systems that you build, you will have to ignore such outputs yourself.

  • 1
    re: If you are not reusing addresses, simply never spend it. Note: as a user, even if you have a wallet that never re-uses an address you are still susceptible to this attack. Raghav's answer is sort of written from the perspective of the code enforcing single spends from an address. The vast majority of user-wallets will not behave this way, and will spend the dust UTXOs received to older, already-used addresses. In other words: "even if your wallet gives you a new address for each transaction, that will not protect you from this attack"
    – chytrik
    Commented Nov 30, 2018 at 20:57
  • Could the wallet remind the user to "clear the dust", by separately sending the dust to the miners ,at randomized time? Then the UTXO bloat issue could be relieved.
    – Chris Chen
    Commented Dec 26, 2019 at 7:05
  • Frankly speaking, I doubt whether this "attack" (which has been tweeted by Samourai devs repeatedly) really exists. It seems to be costly, however, it doesn't seem to be able to efficiently reveal linkages, and furthermore, as the whitepaper had already outlined in the beginning, there would always be some publicly exposed linkages - this is the inherent nature of UTXO model, isn't it?
    – Chris Chen
    Commented Dec 26, 2019 at 7:12
  • AFAIK, Samourai Wallet has a doubtable reputation: reddit.com/r/Bitcoin/comments/9r9344/…
    – Chris Chen
    Commented Dec 26, 2019 at 7:15

To add to Raghav's answer:

Practically, as a typical user, it can be difficult to deal with a dust attack. There is no way to stop or disallow the receiving of a transaction, so the user can only react to the attack after it has occurred. The good thing is, by taking the proper actions a user can easily and effectively mitigate against the attack. In a perfect world of well-informed users and good wallet software, the attack would be futile, and a waste of resources to attempt.

On the downside, the attack can be very effective if not mitigated. The more addresses a wallet has used in the past, the more damaging the attack can be, as an attacker stands to potentially link a great number of addresses all to one user, destroying anonymity.

As Raghav mentioned, some wallets allow the user to manually select UTXOs for spending, or to mark inputs as 'unspendable dust', but many wallets have no such option. In many cases, the UTXO selection is completely hidden from the end user, in an effort to make the wallet more simple to use.

If you receive some dust to one or more of your addresses, your wallet does not allow for manual UTXO selection, and you'd like to counter the attack, then you'll need to import your seed phrase into some new wallet software that allows you to select UTXOs manually. If you'd like to continue using the original wallet software afterwards, you could follow this workflow:

  1. Receive dust attack transactions
  2. Do research to find a reputable wallet that allows for UTXO selection, and download that software onto a secure device
  3. Import the seed phrase from your dust-attacked wallet into the new wallet software, to recreate your dust-attacked wallet in the new wallet software
  4. Using your old wallet software, create a new wallet and copy the receiving address (this will be your new wallet, after you've completed all these steps)
  5. Use the new UTXO-selecting wallet software to send the non-dust UTXOs from your dust-attacked wallet, to your new wallet (created in step 4). As Gabriele mentioned in the comments, creating a single transaction to do this will be detrimental to your privacy (it will link all addresses in the wallet, via the common input ownership heuristic). A privacy-conscious user may thus choose to craft many transactions to transfer the funds to the new wallet (using a ~minimal number of UTXOs as input to each transaction).
  • Step 5 will make obvious to the external observer that ALL the addresses used in the old wallet belongs to the same person (typical problem of massive consolidation). Am I missing something or the last step seems to be just a bad advice? Commented Dec 24, 2019 at 21:11
  • @GabrieleDomenichini that is a great point, I've edited the answer to account for this. Thanks.
    – chytrik
    Commented Dec 24, 2019 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.