65

I've seen the term "dust" used to describe small transactions that might be considered as spam by the Bitcoin network. Is there is a generally accepted definition of this term?

2
  • I created this question while writing an answer and not finding a good link or definition for dust. I'll post my first attempt at an answer, but I'd love to see something more definitive. May 16, 2013 at 20:04
  • Thank's i understand... it's like too small transaction error And transaction non final or allready spend?
    – user24803
    Mar 25, 2015 at 21:47

6 Answers 6

49

Dust is often used colloquially to refer to any small amount UTXO. Bitcoin Core’s precise definition of dust is used in mempool policy to define a minimum for output amounts in standard transactions.

Bitcoin Core considers a transaction output to be dust, when its value is lower than the cost of creating and spending it at the dustRelayFee rate. The default value for dustRelayFee is 3,000 sat/kvB¹, which results in the same dust values as the prior dust definition used before Bitcoin Core 0.15.0. The previous dust definition tied the dust limit to the minRelayTxFee rate and the spending cost of an output exceeding 1/3 of its value.

dust = (input_vsize + output_size) × 3 sat/vB

At the default dustRelayFee of 3,000 sat/kvB, given the size of a P2PKH input being 148 bytes and the size of a P2PKH output being 34 bytes, P2PKH outputs worth less than 546 satoshis are considered dust by Bitcoin Core (546 satoshi being the smallest non-dust value). For P2WPKH outputs, Bitcoin Core considers outputs worth less than 294 satoshis² dust. Since the input sizes of scripthash and taproot outputs are unknowable, Bitcoin Core combines their actual output sizes with the input sizes of the corresponding keyhash types for dust thresholds of 540 satoshis for P2SH, and 330 satoshis for P2WSH and P2TR.

The dustRelayFee can be set with the hidden command line option -dustrelayfee.

Additionally, Bitcoin Core 0.15.0 added a discard_rate. The discard_rate matches the longest target fee rate estimate (currently the 1,000 block fee rate estimate), but is bounded to be between at least dustRelayFee and at most 10,000 satoshi/kvB. Any change output that would be dust at the discard_rate, i.e. would cost more to spend than its value at the discard_rate, will automatically be dropped to the fee instead of being created as a change output.

Other uses of "dust"
Note that the term "dust" is also colloquially used to refer to a) any UTXOs of vanishingly low value and b) for UTXOs that are uneconomical to create or spend at the current feerate.


¹ The transaction size was measured in bytes before segwit. Since segwit, the relevant measure is transaction weight which is either given in virtualbytes (vbyte, vB) or weight units (wu) where 4 wu = 1 vB. For non-segwit transactions, their size is equal to their virtualsize: 1 B = 1 vB. For segwit transactions, their virtualsize is smaller or equal to their size. You can read more about these units on Is there a difference between bytes and virtual bytes (vbytes)?.
² The attentive reader might expect the dust limit for P2WPKH outputs to be 297 satoshis as P2WPKH outputs are 31 bytes and P2WPKH inputs are about 68 vbytes, but it appears that when the dust limit for P2WPKH outputs was implemented, the code contained a rounding error in the vsize of the input that caused it to be assumed one vbyte smaller than it actually is. (Hat tip to Crypt-iQ for pointing this out.)

0
30

EDIT: This answer still gets upvotes 10 years later, so I'm going to try and update the answer a bit as all of the links and numbers were horribly out of date.

Dust is any transaction that is considered too small to be worth carrying out. Dust is a theoretical problem in cryptocurrency because a bad actor could attempt to flood the processing network with an overload of tiny transactions: the equivalent of trying to shutdown a store by paying at the only register with one penny at a time. Therefore, there are some safeguards in the BTC network that prevents "dust" transactions from propagating. Minimum transaction fees are also a way of preventing dust from being a problem.

The exact size below which a transaction is considered "dust", however, has no hard definition. Different clients, software, and different nodes might all have different limits. And those limits might change over time as the value of BTC changes. Amusingly, when I originally wrote this answer BTC was around $20 and 0.01 BTC was considered dust by some clients as it was only worth $0.20. As I edit this article today, that same 0.01 BTC is worth about $170, so I don't think it would be classified as dust by anyone.

The Bitcoin Core currently defines dust here in this code. (Even if you can't read C code, the majority is just text describing the intent of the fucnction.):

    bool IsDust(int64_t nMinRelayTxFee) const
    {
        // "Dust" is defined in terms of CTransaction::nMinRelayTxFee,
        // which has units satoshis-per-kilobyte.
        // If you'd pay more than 1/3 in fees
        // to spend something, then we consider it dust.
        // A typical txout is 34 bytes big, and will
        // need a CTxIn of at least 148 bytes to spend,
        // so dust is a txout less than 54 uBTC
        // (5460 satoshis) with default nMinRelayTxFee
        return ((nValue*1000)/(3*((int)GetSerializeSize(SER_DISK,0)+148)) < nMinRelayTxFee);
    }

I'd consider this the lowest threshold of dust: 54 uBTC. If Bitcoin Core rejects a transaction as dust it's very unlikely for a transaction to be successful. But other software and/or markets might have higher thresholds for dust. And Bitcoin Core might change its threshold again if the prices and/or fees change significantly. The exact definition of dust, and the threshold for what is considered dust may change over time with the transaction volume (and therefore competition for space in the blockchain) and exchange rates.

4
  • 11
    Considering 0.01BTC as dust is probably outdated; it likely dates back to when bitcoins were worth less that US$10. May 17, 2013 at 10:13
  • 1
    Worth noting that the minimum amount counts for all outputs, even change. The satoshi client is set up to just include the extra small amount as a fee to miners instead of creating change for a small amount. Jul 9, 2013 at 0:24
  • Just a note that I added a major update to this answer today, because it was still getting upvotes 10 years later. Comments above may no longer be valid. Dec 12, 2022 at 16:27
  • Hey David, today, Bitcoin Core's dust threshold is 1/10th of what you describe (see my answer). I think the code you are citing is from 2014. Since you just updated your answer, I was wondering whether you might want to point that out about your code snippet.
    – Murch
    Dec 12, 2022 at 22:17
13

To understand 'dust' you must understand a few things:

Firstly, a UTXO is an unspent transaction output. This is essentially a piece of bitcoin somewhere on the blockchain that is unspent.

To create a transaction, 1 or more UTXOs are used to form the inputs, and 1 or more UTXOs are "born" in the process. After the transactions are confirmed, the UTXOs that formed the inputs are now just "TXOs" (ie. they've been spent).

To ensure a transaction is confirmed, a fee must be added, that fee is proportional to the overall size of the transaction, which is the number of bytes the transaction takes up on the blockchain. The more UTXOs are used as inputs, the bigger the transaction will be, thus the higher the fee that needs to be paid.

If I have 1 BTC stored in 1 UTXO, it will cost me less to send that than 1 BTC spread across 10 UTXOs of 0.1 BTC, and it will cost me less to send that than 100 UTXOs of 0.01 BTC.

The fees are calculated as satoshis per byte, and the fees fluctuate depending on how busy the network is.

Every UTXO you want to use in a transaction will incur an increase in fee.

Every UTXO takes up a number of bytes in the transaction.

If you multiply fee per byte by the number of bytes taken by the UTXO and it exceeds the value held in the UTXO, then this UTXO is said to be 'dust'.

So a 'dust' UTXO is a UTXO that isn't worth including in a transaction because to do so would incur a fee increase higher than the value of the UTXO.

2

Comment definition of dust from the actual Bitcoin repo on Github found on file policy.cpp:

// "Dust" is defined in terms of dustRelayFee,
// which has units satoshis-per-kilobyte.
// If you'd pay more in fees than the value of the output
// to spend something, then we consider it dust.
// A typical spendable non-segwit txout is 34 bytes big, and will
// need a CTxIn of at least 148 bytes to spend:
// so dust is a spendable txout less than
// 182*dustRelayFee/1000 (in satoshis).
// 546 satoshis at the default rate of 3000 sat/kB.
// A typical spendable segwit txout is 31 bytes big, and will
// need a CTxIn of at least 67 bytes to spend:
// so dust is a spendable txout less than
// 98*dustRelayFee/1000 (in satoshis).
// 294 satoshis at the default rate of 3000 sat/kB.
1

Dusty outputs are really small sized outputs from a transaction. Bitcoin transactions are 0 sum so what goes in must come out. When you make a transaction to send some money from your address to another address, any remainder gets sent to a change address that you'll be in control of. Now if that remainder is really small then it becomes "dusty." Then if you try to make another transaction with that dusty unspent output (UTXOs) miners will reject the transaction and it won't get confirmed, ergo the bitcoin won't move.

The bitcoin network depending on the version a miner is running has different definitions of what is considered dusty UTXOs. If this site is correct version of bitcoind running on nodes the bulk of the network is at 0.10 and 0.9.*.For 0.9.3 the dust limit is 546 satoshis. For version .10 I believe it is 546 and earlier versions of 0.9 I believe was higher at 10x around 5k satoshis.

0

Bitcoin dust refers to the thousands and thousands of tiny transactions that some sites flood the network and thus the blockchain with.

1
  • 1
    I think usually it rather refers to the transaction outputs, not the transactions.
    – Murch
    Jan 25, 2016 at 8:17

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