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

lnpeer: check just-in-time channel opening fee

Public commit record

What the developer wrote

Authored by f321x

60/100 · Adequate
lnpeer: check just-in-time channel opening fee

Check the just-in-time channel opening fee when receiving an incoming
channel opening.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This commit adds a safety check for Electrum's Lightning 'just-in-time channel opening' feature. When someone opens a payment channel to you on the fly, the remote party can propose an extra opening fee. Previously the code accepted any fee with only a 'todo' comment. Now it rejects the channel if that fee exceeds 10% of the channel's funding amount. Without this check, a malicious or misconfigured Lightning Service Provider (LSP) could potentially charge an unreasonably high opening fee.

Recommended action

Users running Lightning nodes with zeroconf / just-in-time channel opening should upgrade to a version containing this commit. Operators should also monitor LSP fee announcements once fee-discovery support is added, since the current 10% heuristic is a stopgap.

Security signals we found

01

Previously unvalidated fee field now has an upper-bound check

02

Replaces a TODO/pass with an explicit rejection

03

Just-in-time / zeroconf channel opening path is the affected code path

04

Mitigates potential overcharging by a remote LSP peer

Risk score

Why this scored 64/100

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