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

Cleanup dust exposure due to excess fees in `get_next_commitment_stats`

Public commit record

What the developer wrote

Authored by Leo Nash

62/100 · Adequate
Cleanup dust exposure due to excess fees in `get_next_commitment_stats`
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Explains rationale or failure mode! No meaningful explanatory body
The short version

What changed, and why it matters

This commit changes how Lightning Dev Kit calculates 'dust exposure'—a risk measure for tiny outputs that can be abused to make a channel uneconomical to close. The old code only counted extra fees on the counterparty's transaction when the counterparty set a feerate above a configured limit, and it stored that as an optional value. The new code always adds excess fees to dust exposure on counterparty transactions and returns a plain number for the extra exposure if one more accepted HTLC were added. The change appears to fix an accounting gap where excess fees on counterparty commitments were not always included in the local node's dust-exposure check, which could let a remote peer push fees high enough to make the channel unrecoverable.

Recommended action

Review callers of `get_next_commitment_stats` to ensure they handle the new non-optional `extra_accepted_htlc_dust_exposure_msat` correctly. Verify that the change does not introduce regressions for anchor-zero-fee channels, where `feerate_per_kw` and excess feerate are expected to be zero. Consider adding or updating tests that exercise high counterparty feerates and confirm dust exposure is now always bounded.

Security signals we found

01

Change in fee/dust accounting for counterparty commitment transactions

02

Removal of optional dust-exposure field in favor of always-computed value

03

Use of `saturating_sub` instead of `checked_sub` for excess feerate

04

Renaming from 'counterparty' to 'local/broadcaster' semantics in helper

05

Commit title explicitly mentions 'Cleanup dust exposure due to excess fees'

Risk score

Why this scored 59/100

Our methodology →
Potential impact 18/30
Exploitability 12/25
Stealth signal 10/15
Affected reach 10/15
Confidence 6/10
Evidence quality 3/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.