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

xpay: add helper to fetch the MPP amount ...

Public commit record

What the developer wrote

Authored by Lagrang3

68/100 · Adequate
xpay: add helper to fetch the MPP amount ...

for the final hop payload, which for normal xpay payments is known in
advanced but not for sendamount payments (includefees flag on).

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds a helper function in Core Lightning's xpay plugin to correctly determine the multi-path payment (MPP) amount used in the final hop of a payment route. For normal xpay payments, this amount is already known, but for 'sendamount' payments where fees are included in the amount, the actual delivered amount must be used instead. The change ensures the correct value is passed when building both regular and blinded payment routes, likely fixing a bug where the wrong MPP amount could be set.

Recommended action

Review the prior behavior to confirm whether incorrect MPP amounts could cause payment failure, routing loops, or exploitable fee/amount manipulation. Treat as a bugfix with possible reliability or minor security implications. No immediate emergency action is indicated from the diff alone.

Security signals we found

01

Logic correction in payment onion payload construction

02

Use of assert on maxparts in fee-inclusive path

03

Potential prior mismatch between delivered amount and MPP amount in final hop

04

No explicit security framing in commit message

Risk score

Why this scored 32/100

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