Author

Topic: Dust attack - UTXO (Read 390 times)

legendary
Activity: 2310
Merit: 4085
Farewell o_e_l_e_o
January 10, 2021, 02:59:19 AM
#10
Here is a guide showing how to dump the dust if you use Electrum: https://gist.github.com/ncstdc/90fe6209a0b3ae815a6eaa2aef53524c


In order to make the things more clear, I will detail how to mark some address as freezed so that the dusted coins do not mark other clean coins:

There are two separate possible case:
  • If a dust attack hits an empty address, you can actually damage your privacy, if you are not aware of this attack. If you spend from that address, you are probably going to use the dusted UTXO with your other UTXO's, effectively linking a "past" address of yours with your current transaction. This is very dangerous.
  • If a dust attack hits an address with a positive balance it is no major damage, I think: the dust comes together in the address with some other UTXO's, so it would have been trivial to follow those coins without the dust in the first place. Dust acts as a not-so-cheap marker of your public UTXO's. You know you are being tracked anyway on the blockchain, so you act consciously.

The action to be taken are then different:
  • If the dusted address is empty: "Freeze address", this will prevent using the address in any future operation in the wallet
  • If the dusted address is not empty: "Freeze Coin", this will freeze only the dusted UTXO (you can think as UTXO and Coins as synonymous, while the address will be able to spend the UTXO as usual.


ELECTRUM
I will show you the coin Control feature in Electrum, one of the most used wallet to offer such a feature.
If you are using another wallet and you get dusted, my suggestion is to import your wallet in Electrum and do the following steps.

To avoid privacy concerns I created a test wallet, dusted it and censored some relevant information.

This is the dusted Wallet.


I am assuming the dust hits an empty address, maybe one I used in the past and is now empty after a spend.


Freeze Address
Since the address is empty, and the only associated UTXO is dusted, I decide to block the whole address.
This will make this address unable to spend any coin.


1.Make Electrum show all your Addresses.
Click on "View" menù, select "Show Addresses"



2. Locate the address where you received the dust.
You might want to label it. In this case it is easy, as it is the only one address with a positive balance. In your case you might have many positive addresses.



3. Freeze the dusted address.
Right Click on the dusted address, select "Freeze"



4. The Address is now Freezed.
The address is highlighted in dark Blue



From now on, all the UTXO pertaining that address won't be used until the address is Freezed.
Those UTXO won't mix with other "clean" UTXO then, defending us from the Dusting Attack.


Freeze Coin

In case you receive the dust on an address with some other coins, you might not lose such coins. Then you can freeze the dust UTXO only.

1.Make Electrum show all your Coins.
Click on "View" menù, select "Show Coins"



2. Locate the UTXO that are the Dust.
You might want to label it. In this case it is easy, as it is the only one UTXO. In your case you might have many UTXO's.



3. Freeze the Coins.
Right Click on the dusted address, select "Freeze"



4. The Coin is now Freezed.
The coin is highlighted in dark Blue, and won't be spent in future transactions.


legendary
Activity: 4466
Merit: 3391
January 09, 2021, 08:37:23 PM
#9
Here is a guide showing how to dump the dust if you use Electrum: https://gist.github.com/ncstdc/90fe6209a0b3ae815a6eaa2aef53524c

The transaction sends the 547 sats to a miner. The benefit of the OP_RETURN is that it doesn't create a UTXO that will never be spent. It works with hardware wallets, too.
HCP
legendary
Activity: 2086
Merit: 4361
January 09, 2021, 03:08:07 PM
#8
Alternatively, you could send 0.00000031 BTC back to the address you received it from using a 2 sat/byte fee when the mempool is low.  This would get all the dust out of your wallet, send a useless amount of dust to the person who dusted you, and donate the rest to Bitcoin miners.
That's a good idea... except for the fact that creating an output of 0.00000031 BTC would put it below the dust limit and mean that your transaction is likely to be rejected by other nodes if you attempt to send that.

There is a reason why these pests create UTXOs of 0.00000547 BTC Tongue
legendary
Activity: 2380
Merit: 5213
January 09, 2021, 03:07:21 PM
#7
Alternatively, you could send 0.00000031 BTC back to the address you received it from using a 2 sat/byte fee when the mempool is low.  
I don't think that's possible.
Any output lower than 547 satoshi is considered as dust and such a transaction will be rejected by nodes.
donator
Activity: 4760
Merit: 4323
Leading Crypto Sports Betting & Casino Platform
January 09, 2021, 02:50:40 PM
#6
Today we received to one of our addresses a transaction of 547 sats (0.00000547).
Is there any way to tell the bitcoin-cli to freeze / forget this UTXO and never try to spend it when paying from our wallet?

Alternatively, you could send 0.00000031 BTC back to the address you received it from using a 2 sat/byte fee when the mempool is low.  This would get all the dust out of your wallet, send a useless amount of dust to the person who dusted you, and donate the rest to Bitcoin miners.  Might be a better solution then forgetting it is there and using coin control features to avoid sending it with every transaction you make and possibly costing you increased fees if you ever include it by accident.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
January 09, 2021, 03:36:43 AM
#5
Thanks. Can this also be done using the bitcoin-cli client?
Coin control is a feature that is implemented in the GUI. You can replicate this by getting listunspent and construct your raw transaction, sign and broadcast it.

Lockunspent is the easier way to do it without the need to specify inputs. You can just use sendtoaddress normally after using lockunspent. Note that this list doesn't persist through a Bitcoin Core restart.
member
Activity: 162
Merit: 24
January 09, 2021, 03:10:45 AM
#4
Thanks. Can this also be done using the bitcoin-cli client?

As suggested by LoyceV, You can use "Coin control" feature.
For using this feature, click on "setting" at top of the window and then select "option". Go to "wallet" tab and check "Enable coin control features".



After coin control feature is enabled, you will see "Inputs" button in "Send" tab.  



You can click on "Inputs" button and select UTXOs that you would like to spend.
legendary
Activity: 2380
Merit: 5213
January 08, 2021, 05:04:32 PM
#3
As suggested by LoyceV, You can use "Coin control" feature.
For using this feature, click on "setting" at top of the window and then select "option". Go to "wallet" tab and check "Enable coin control features".



After coin control feature is enabled, you will see "Inputs" button in "Send" tab.  



You can click on "Inputs" button and select UTXOs that you would like to spend.
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
January 08, 2021, 04:54:18 PM
#2
Today we received to one of our addresses a transaction of 547 sats (0.00000547).
Is there any way to tell the bitcoin-cli to freeze / forget this UTXO and never try to spend it when paying from our wallet?
I haven't tried it from the CLI, but lockunspent looks like what you're looking for.

As an alternative: use coin control to send the dust together with other inputs from the same address. It won't compromise privacy, but you should only do this when fees are low enough to be worth it.
member
Activity: 162
Merit: 24
January 08, 2021, 04:40:09 PM
#1
Today we received to one of our addresses a transaction of 547 sats (0.00000547).
Is there any way to tell the bitcoin-cli to freeze / forget this UTXO and never try to spend it when paying from our wallet?
Jump to: