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

xpay: when acting as pay, imitate its idempotent behavior.

Public commit record

What the developer wrote

Authored by Rusty Russell

65/100 · Adequate
xpay: when acting as pay, imitate its idempotent behavior.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body
The short version

What changed, and why it matters

This change makes the newer 'xpay' payment plugin behave like the older 'pay' plugin when an invoice has already been paid. Previously, if xpay tried to pay an invoice that was already settled, it would give up with an error. Now it looks up the previous successful payment details and returns them as if the current request succeeded. This is a compatibility fix to avoid surprising users and callers who expected the old pay plugin's idempotent behavior.

Recommended action

Review whether returning synthetic success for already-paid invoices could be abused to mislead callers or hide payment failures. Ensure listsendpays results are authoritative and that the aggregated multi-part values cannot overflow or be inconsistent. Consider adding tests for duplicate-payment behavior and edge cases such as partial or conflicting completed payments.

Security signals we found

01

Behavioral change from error-on-duplicate to success-on-duplicate

02

Synthetic success response constructed from prior payment records

03

Potential for incorrect idempotency if listsendpays result is stale or manipulated

04

No input validation or rate-limiting added for repeated duplicate-payment requests

Risk score

Why this scored 33/100

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