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

lsp_plugin: add warning if extra_fee is wrong

Public commit record

What the developer wrote

Authored by Peter Neuroth

68/100 · Adequate
lsp_plugin: add warning if extra_fee is wrong

The extra_fee tlv appended to the update_add_htlc message is set by the
LSP and should specify what was deducted from a single htlc. If it does
not match the expected amount, we log a warning message.

Signed-off-by: Peter Neuroth <pet.v.ne@gmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This change adds a warning log in the LSPS (Lightning Service Provider Specification) plugin when the extra fee reported by an LSP does not match the expected amount. It does not actually reject the problematic payment; it only logs a warning and includes a developer note saying a strict implementation should reject it. The change also removes some older placeholder comments and simplifies how the invoice total amount is determined.

Recommended action

Treat this as a minor hardening change, not a complete fix. If operating an LSPS client node, monitor for the new warning and consider whether to enforce rejection of HTLCs with mismatched extra_fee amounts until the FIXME is resolved upstream. Review the removed FIXME comments to ensure duplicate-payment and MPP protections are still tracked elsewhere.

Security signals we found

01

New validation check comparing htlc_amt + extra_fee against onion_amt

02

FIXME comment indicating current code does not reject mismatched amounts

03

extra_fee TLV read from untrusted update_add_htlc message

04

Removed defensive FIXME comments about duplicate payment and MPP checks

05

No functional rejection or error return on detected mismatch

Risk score

Why this scored 26/100

Our methodology →
Potential impact 4/30
Exploitability 3/25
Stealth signal 6/15
Affected reach 4/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.