AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 36 Bitcoin

bitcoin/tx.c: use 330 sat dust limit for P2TR/P2WPKH change outputs Fixes #8395 Fix by checking is_elements: Elements keeps 546 sat, Bitcoin uses 330 sat. Changelog-Fixed: Transactions now correctly create change outputs >= 330 sat for P2TR/P2WPKH instead of absorbing them as fees

Public commit record

What the developer wrote

Authored by Andezion

81/100 · Strong
bitcoin/tx.c: use 330 sat dust limit for P2TR/P2WPKH change outputs Fixes #8395
Fix by checking is_elements: Elements keeps 546 sat, Bitcoin uses 330 sat.
Changelog-Fixed: Transactions now correctly create change outputs >= 330 sat for P2TR/P2WPKH instead of absorbing them as fees
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Core Lightning where small change outputs on Bitcoin were being treated as too tiny to keep, causing them to be silently added to transaction fees instead of returned to the user. The fix lowers the threshold for P2TR/P2WPKH change outputs on Bitcoin from 546 satoshis to 330 satoshis, matching current Bitcoin network rules. Elements/Liquid still uses 546. Users could previously lose small change amounts as extra fees.

Recommended action

Review whether any other output types or fee-estimation paths use the same stale dust limit. Consider adding equivalent tests for P2WPKH change and for Elements behavior. No urgent security patch deployment is required, but the fix should be included in the next release.

Security signals we found

01

Incorrect dust-limit threshold caused legitimate change outputs to be converted to fees

02

User funds could be lost as transaction fees under specific output sizes

03

Fix is network-specific (Bitcoin vs Elements) to avoid changing Liquid behavior

04

Regression test added for P2TR change dust boundary

Risk score

Why this scored 36/100

Our methodology →
Potential impact 8/30
Exploitability 3/25
Stealth signal 6/15
Affected reach 7/15
Confidence 8/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.