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

plugin: nwc: consider routing fees for payment budget

Public commit record

What the developer wrote

Authored by f321x

85/100 · Strong
plugin: nwc: consider routing fees for payment budget

Include the lightning routing fees into the payment budget accounting
to prevent untrusted nwc clients from exceeding the budget by crafting
a high fee route.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a bug in Electrum's NWC (Nostr Wallet Connect) plugin where a connected client could spend more than its allowed daily budget by deliberately routing a Lightning payment through an expensive path. Previously, only the invoice amount was counted toward the budget, not the routing fees. The fix reserves the maximum expected fee up front and later adjusts the budget to reflect the actual fee paid.

Recommended action

Users running Electrum with the NWC plugin and daily spending budgets should upgrade to a version containing this commit. Review any NWC connections with low daily budgets for unexpected fee spending. No immediate broader action is required beyond normal patching.

Security signals we found

01

budget bypass via unaccounted routing fees

02

untrusted NWC client could exceed daily spending limit

03

fix adds fee reservation and actual-fee reconciliation

04

payment budget enforcement moved from silent None to explicit ValueError

Risk score

Why this scored 67/100

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