Given an Output and (optionally) a dust relay fee in satoshis-per-kilobyte, return the minimum satoshi value for this output to not be considered a "dust output". For nodes to relay or mine a transaction with this output, the output must have a satoshi value greater than or equal to this threshold.
By standardness, if an output is expected to cost more than 1/3 of it's value in fees to spend, it is considered dust. When calculating the expected fee, the input size is assumed to be (at least) the size of a typical P2PKH input spent using a 72-byte ECDSA signature, 148 bytes:
The encoded length of the serialized output is added to 148 bytes, and the
dust threshold for the output is 3 times the minimum fee for the total bytes.
For a P2PKH output (34 bytes) and the standard 1000 sat/Kb dust relay fee,
this results in a dust limit of
546 satoshis (
Note, arbitrary data outputs are not required to meet the dust limit as they are provably unspendable and can be pruned from the UTXO set.
the output to test
the "dust relay fee", defaults to
Generated using TypeDoc