Context
Part of #6965 — Dust Attack Protection and Donate Dust.
This issue covers the case where a potential dust UTXO was already spent before Keeper could mark it Do Not Spend. In that case, Keeper should trace the current wallet-owned descendant UTXOs of that spend and mark them Do Not Spend. It also covers labelling the spending transaction in transaction history. See also:
Goal
When Keeper scans wallet history and finds a UTXO that would have met the dust rules but was already spent, it should:
- Mark the spending transaction as a Potential dust spend
- Trace current wallet-owned descendant UTXOs from that spend
- Mark all traceable current affected descendant UTXOs as Do Not Spend with reason: Linked to potential dust spend
This applies across descendant layers where traceable — not only one layer deep.
Detection: Already-Spent Dust
A historical UTXO is considered potential dust if it would have met these rules at the time it was received:
- Amount under 5,000 sats, AND
- Received on a reused receive address, OR received on an out-of-order receive address, OR received on a reused change address
If such a UTXO was spent in a transaction, that transaction is a Potential dust spend.
Descendant UTXO Marking
From the Potential dust spend transaction:
- Identify all current wallet-owned UTXOs that descended from that transaction (outputs that are still unspent and owned by this wallet)
- Trace through multiple layers where possible
- Mark each as Do Not Spend
- Reason: Linked to potential dust spend
These UTXOs should be classified in the same scan pass as normal dust classification.
Scan Points
This classification runs during the same scan points as normal dust classification:
- wallet creation
- wallet import / restore
- wallet opened after app update (classify UTXOs without state)
- normal wallet refresh
- pull-to-refresh
- new incoming transaction scan
No separate global upgrade script is required.
Transaction History Labels
Transaction list item: Show label Potential dust spend on the spending transaction.
Transaction detail:
Show explanation:
This transaction may have spent a suspicious small amount together with other wallet funds. This may have reduced wallet privacy.
This is informational only — no action is shown for the already-spent dust itself.
Red Dot & UI Indicator Rules
- Show red dot on wallet card / More Options if there are current Do Not Spend coins that descended from a potential dust spend
- A historical Potential dust spend alone does not show a red dot if there are no current Do Not Spend descendant coins
- Includes Do Not Spend coins appears in Wallet Details if there are current Do Not Spend descendant coins
UTXO Details for Linked Descendants
For a UTXO marked Do Not Spend due to a linked potential dust spend:
- Show reason: Linked to potential dust spend
- Show explanation: Keeper marked this coin Do Not Spend to help protect wallet privacy.
- Show button: Mark Spendable
- On action, persist override and stay on UTXO Details
- Success feedback: Coin marked spendable
- System-marked Do Not Spend cannot be removed like a normal label — user must use explicit CTA
Acceptance Criteria
Copy Requirements
Use these exact labels:
- Do Not Spend
- Linked to potential dust spend (reason on UTXO)
- Potential dust spend (transaction label)
- Keeper marked this coin Do Not Spend to help protect wallet privacy.
- This transaction may have spent a suspicious small amount together with other wallet funds. This may have reduced wallet privacy.
- Mark Spendable
- Coin marked spendable
Design Requirements
- Reuse existing transaction list item label/chip component
- Reuse existing transaction detail info/warning pattern
- Reuse existing UTXO label/chip component
- No new assets required
- Do not create a new dust history screen
Context
Part of #6965 — Dust Attack Protection and Donate Dust.
This issue covers the case where a potential dust UTXO was already spent before Keeper could mark it Do Not Spend. In that case, Keeper should trace the current wallet-owned descendant UTXOs of that spend and mark them Do Not Spend. It also covers labelling the spending transaction in transaction history. See also:
Goal
When Keeper scans wallet history and finds a UTXO that would have met the dust rules but was already spent, it should:
This applies across descendant layers where traceable — not only one layer deep.
Detection: Already-Spent Dust
A historical UTXO is considered potential dust if it would have met these rules at the time it was received:
If such a UTXO was spent in a transaction, that transaction is a Potential dust spend.
Descendant UTXO Marking
From the Potential dust spend transaction:
These UTXOs should be classified in the same scan pass as normal dust classification.
Scan Points
This classification runs during the same scan points as normal dust classification:
No separate global upgrade script is required.
Transaction History Labels
Transaction list item: Show label Potential dust spend on the spending transaction.
Transaction detail:
Show explanation:
This is informational only — no action is shown for the already-spent dust itself.
Red Dot & UI Indicator Rules
UTXO Details for Linked Descendants
For a UTXO marked Do Not Spend due to a linked potential dust spend:
Acceptance Criteria
Copy Requirements
Use these exact labels:
Design Requirements