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

Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

Public commit record

What the developer wrote

Authored by Matt Corallo

81/100 · Strong
Merge PR 'Account for current HTLC fees in dust exposure' (#5690)

from tankyleo/leo/2026-11-current-htlc-fee-exposure into main

Reviewed-on: https://git.rust-bitcoin.org/lightningdevkit/rust-lightning/pulls/5690
Reviewed-by: Matt Corallo <matt@noreply.git.rust-bitcoin.org>
✓ 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 change fixes how Lightning nodes calculate the financial risk from tiny ('dust') HTLCs when the current on-chain fee rate is higher than the node's own local fee estimate. Previously, the code only considered a buffered fee rate when deciding which HTLCs count as dust and how much extra fee exposure they create. The patch now checks both the actual current fee rate and the buffered fee rate, and uses the worse of the two when limiting how much can be sent. This prevents a node from accepting or sending HTLCs that look safe under a buffered estimate but are actually dust at the current fee rate, which could leave the node paying unexpectedly high commitment transaction fees relative to the HTLC value.

Recommended action

Review and merge if not already merged; ensure downstream users update to include this fix. Operators should monitor `max_dust_htlc_exposure` settings and fee estimator behavior. No immediate emergency response is indicated, but the fix should be included in the next release.

Security signals we found

01

Incorrect fee exposure accounting for dust HTLCs

02

Potential to accept HTLCs whose commitment/HTLC-success fees exceed their value under current feerate

03

Economic griefing / forced-channel-closure cost manipulation

04

Regression test added for the fixed scenario

Risk score

Why this scored 63/100

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