Draft BIP: DustSweep – policy-only UTXO dust compaction

117 views
Skip to first unread message

defenwycke

unread,
Dec 11, 2025, 8:34:16 AM (6 days ago) Dec 11
to Bitcoin Development Mailing List
Hello list,

I’ve been working on a small policy proposal that aims to address one very specific problem: the long-term accumulation of uneconomical dust in the UTXO set.

The idea is intentionally narrow. I’m calling it DustSweep, and it defines a strict, non-abusable class of transactions that nodes may relay and miners may include only when the mempool and block space are underutilised. The goal is to give wallets a predictable way to compact dust without introducing new spam vectors or touching consensus.

A DustSweep transaction has the following properties:

  • all inputs are “dust-class” UTXOs

  • only standard scripts (P2PKH / P2WPKH / P2TR)

  • exactly one output

  • no metadata at all (no OP_RETURN, inscriptions, TLVs, etc.)

  • minimum of 5 inputs (to ensure meaningful UTXO reduction)

  • size capped

  • it pays a flat 1 sat per input fee

Nodes place these in a small, separate sub-mempool. They’re only accepted when the normal mempool is <50% full, and they’re automatically evicted if normal mempool usage hits 95%. Miners can include them up to a small weight fraction (I suggest ~5%) but only after filling the block with regular fee-paying transactions. The intention is that DustSweep never competes with the fee market and only uses blockspace that would otherwise go unused.

This is all policy-level. No consensus changes, no new transaction format, nothing that affects validation. Nodes that don’t implement it simply treat these as low-fee transactions and drop them.

The motivation is straightforward: we don’t currently have a safe, structured way to compact dust, and the UTXO set continues to grow from outputs that are effectively unspendable under normal fee conditions. DustSweep tries to offer a predictable, opt-in mechanism for wallets to clean that up without creating any new attack surface.

Full draft BIP and supporting documents are here:

https://github.com/defenwycke/bip-dust-sweep

I’d appreciate feedback on the policy details, thresholds, and whether this fits within what node operators and wallet developers would actually want to use. Happy to adjust parameters if there’s a better balance point.

Kind regards,

Defenwycke

Jonathan Voss

unread,
Dec 12, 2025, 1:16:24 PM (5 days ago) Dec 12
to Bitcoin Development Mailing List
Interesting proposal. Something like that would be helpful, but perhaps it would be more useful if it was not quite so narrowly defined. For example, instead of requiring all inputs be dust-class UTXO, it could require a minimum of 80% dust-class inputs; instead of exactly one output, it could be max_outputs = floor(n_inputs / 5) to keep a maximum output/input ratio of 1/5. This could allow for better aggregation of dust outputs into economically meaningful, monetary outputs than the narrower definition while maintaining the incentives for meaningfully reducing UTXO set size.

I would run this policy on my node. Hashers should ultimately be okay with this policy since someone among them also has to run full nodes, and it would provide an additional (albeit very small) fee source when block space demand is low.

Defenwycke

unread,
Dec 12, 2025, 4:26:35 PM (5 days ago) Dec 12
to Jonathan Voss, Bitcoin Development Mailing List
Hello Jonathan,

Thanks for the thoughtful feedback — that makes sense.

I started with a very narrow definition mostly to make the invariant obvious and easy to reason about. Every DustSweep tx should monotonically reduce the UTXO set and never meaningfully compete with the fee market. As long as that holds, I’m not particularly attached to any one parameter.

I agree that requiring 100% dust inputs and exactly one output is probably overly strict in practice. A majority dust requirement and an output/input ratio cap seem like reasonable ways to preserve the incentive (net UTXO reduction) while making it more usable for real wallets.

My main goal here is to give operators something that’s safe to run and predictable in behaviour — cheap, bounded, and only active when blockspace would otherwise go unused. I’m happy to adjust thresholds or relax constraints as long as those properties remain intact.

Appreciate you taking the time to look at it.

Kind regards,

Defenwycke


--
You received this message because you are subscribed to the Google Groups "Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bitcoindev+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/382cefe0-4ac0-43d7-919b-c56fad0a9b27n%40googlegroups.com.

Murch

unread,
Dec 12, 2025, 6:19:17 PM (4 days ago) Dec 12
to bitco...@googlegroups.com
Hey Defenwycke,

> all inputs are “dust-class” UTXOs

What does “dust-class” mean? Are you using the Bitcoin Core dust limit
or talking about small amounts in general? I don’t have figures off the
top of my head, but I would assume that there are relatively few UTXOs
smaller than Bitcoin Core’s dust limit.

> only standard scripts (P2PKH / P2WPKH / P2TR)

You might want to clarify that you mean only P2TR KP inputs. Or would
P2TR SP be permitted?

> Nodes place these in a small, separate sub-mempool. They’re only
> accepted when the normal mempool is <50% full, and they’re
> automatically evicted if normal mempool usage hits 95%.

It would be a lot of work to have a separate pool for this, and I don’t
see a reason why they couldn’t just go in the regular mempool. If the
mempool fills up, they’d have the lowest feerates and they’d get kicked
out first anyway. That said, at 50% full, there are still around ~30
blocks worth of transactions waiting in the mempool that pay fees, …

> Miners can include them up to a small weight fraction (I suggest ~5%)
but only after filling the block with regular fee-paying transactions.

… so if they are only considered in blocks that aren’t full, the only
ones I have seen lately are miners using a minimum feerate of 1 s/vB for
their block templates. Looking at some popular mempool statistic sites,
in the past 32 months, there would have only been organically non-full
blocks between April and August this year.

I assume the intention is to only relay these transactions when there
are blocks that aren’t full, to limit the bandwidth-wasting vector this
feature introduces, but overall it seems to me that it would be most
likely for such transactions to sit in nodes’ memory until they expire.

All that said, at the new minimum feerate of 0.1 s/vB, a 148 vB P2PKH
input costs 15 sats, a 68 vB P2WPKH input costs 7 sats, and a 57.5 vB
P2TR input costs 6 sats. It doesn’t seem obvious to me that saving a few
dozen sats would greatly foster the users’ urge to consolidate. It feels
like a lot of overhead for such a small incentive to the users, and
relying on the miners to give away blockspace below market value feels a
bit optimistic as well.

Cheers,
Murch

On 2025-12-11 04:53, defenwycke wrote:
> Hello list,
>
> I’ve been working on a small policy proposal that aims to address one
> very specific problem: the long-term accumulation of uneconomical dust
> in the UTXO set.
>
> The idea is intentionally narrow. I’m calling it DustSweep, and it
> defines a strict, non-abusable class of transactions that nodes may
> relay and miners may include only when the mempool and block space are
> underutilised. The goal is to give wallets a predictable way to compact
> dust without introducing new spam vectors or touching consensus.
>
> A DustSweep transaction has the following properties:
>
> *
>
> all inputs are “dust-class” UTXOs
>
> *
>
> only standard scripts (P2PKH / P2WPKH / P2TR)
>
> *
>
> exactly one output
>
> *
>
> no metadata at all (no OP_RETURN, inscriptions, TLVs, etc.)
>
> *
>
> minimum of 5 inputs (to ensure meaningful UTXO reduction)
>
> *
>
> size capped
>
> *
>
> it pays a flat 1 sat per input fee
>
> Nodes place these in a small, separate sub-mempool. They’re only
> accepted when the normal mempool is <50% full, and they’re automatically
> evicted if normal mempool usage hits 95%. Miners can include them up to
> a small weight fraction (I suggest ~5%) but only after filling the block
> with regular fee-paying transactions. The intention is that DustSweep
> never competes with the fee market and only uses blockspace that would
> otherwise go unused.
>
> This is all policy-level. No consensus changes, no new transaction
> format, nothing that affects validation. Nodes that don’t implement it
> simply treat these as low-fee transactions and drop them.
>
> The motivation is straightforward: we don’t currently have a safe,
> structured way to compact dust, and the UTXO set continues to grow from
> outputs that are effectively unspendable under normal fee conditions.
> DustSweep tries to offer a predictable, opt-in mechanism for wallets to
> clean that up without creating any new attack surface.
>
> Full draft BIP and supporting documents are here:
>
> https://github.com/defenwycke/bip-dust-sweep
>
> I’d appreciate feedback on the policy details, thresholds, and whether
> this fits within what node operators and wallet developers would
> actually want to use. Happy to adjust parameters if there’s a better
> balance point.
>
> Kind regards,
>
> Defenwycke
>
> --
> You received this message because you are subscribed to the Google
> Groups "Bitcoin Development Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to bitcoindev+...@googlegroups.com
> <mailto:bitcoindev+...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/
> bitcoindev/b47aa182-bca7-44d7-bed1-f3cc2df30ef5n%40googlegroups.com
> <https://groups.google.com/d/msgid/bitcoindev/b47aa182-bca7-44d7-bed1-
> f3cc2df30ef5n%40googlegroups.com?utm_medium=email&utm_source=footer>.

OpenPGP_0xACFDB93A9175DCAB.asc
OpenPGP_signature.asc
Reply all
Reply to author
Forward
0 new messages