Friday, April 18, 2025
HomeBitcointransactions - What is supposed by Bitcoin mud?

transactions – What is supposed by Bitcoin mud?

Mud is commonly used colloquially to check with any small quantity UTXO. In distinction, Bitcoin Core’s exact definition of mud is utilized in mempool coverage to outline a minimal for output quantities in customary transactions.

Bitcoin Core considers a transaction output to be mud, when its worth is decrease than the price of creating and spending it on the dustRelayFee price. The default worth for dustRelayFee is 3,000 sat/kvB¹, which leads to the identical mud values because the prior mud definition used earlier than Bitcoin Core 0.15.0. The earlier mud definition tied the mud restrict to the minRelayTxFee price and the spending value of an output exceeding 1/3 of its worth.

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

On the default dustRelayFee of three,000 sat/kvB, given the dimensions of a P2PKH enter being 148 bytes and the dimensions of a P2PKH output being 34 bytes, P2PKH outputs value lower than 546 satoshis are thought-about mud by Bitcoin Core (546 satoshi being the smallest non-dust worth). For P2WPKH outputs, Bitcoin Core considers outputs value lower than 294 satoshis² mud. For the reason that enter sizes of scripthash and taproot outputs are unknowable, Bitcoin Core combines their precise output sizes with the enter sizes of the corresponding keyhash varieties for mud thresholds of 540 satoshis for P2SH, and 330 satoshis for P2WSH and P2TR.

The dustRelayFee might be set with the hidden command line possibility -dustrelayfee.

Moreover, Bitcoin Core 0.15.0 added a discard_rate. The discard_rate matches the longest goal charge price estimate (presently the 1,000 block charge price estimate), however is bounded to no less than dustRelayFee and at most 10,000 satoshi/kvB. Any change output that will be mud on the discard_rate, i.e. would value extra to spend than its worth on the discard_rate, will mechanically be dropped to the charge as an alternative of being created as a change output.

Different makes use of of “mud”
Observe that the time period “mud” can also be colloquially used to check with a) any UTXOs of vanishingly low worth and b) for UTXOs which might be uneconomical to create or spend at the present feerate.


¹ The transaction dimension was measured in bytes earlier than segwit. Since segwit, the related measure is transaction weight which is both given in virtualbytes (vbyte, vB) or weight models (wu) the place 4 wu = 1 vB. For non-segwit transactions, their dimension is the same as their virtualsize: 1 B = 1 vB. For segwit transactions, their virtualsize is smaller or equal to their dimension. You’ll be able to learn extra about these models on Is there a distinction between bytes and digital bytes (vbytes)?.
² The attentive reader may count on the mud restrict for P2WPKH outputs to be 297 satoshis as P2WPKH outputs are 31 bytes and P2WPKH inputs are about 68 vbytes, however it seems that when the mud restrict for P2WPKH outputs was applied, the code contained a rounding error within the vsize of the enter that triggered it to be assumed one vbyte smaller than it truly is. (Hat tip to Crypt-iQ for pointing this out.)

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments