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

fix: prevent duplicate BOLT12 offer payments on retry (#4287)

Public commit record

What the developer wrote

Authored by Vlad Stan

70/100 · Adequate
fix: prevent duplicate BOLT12 offer payments on retry (#4287)
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Uses a recognizable type or scope✓ Links an issue, advisory, or supporting reference! No meaningful explanatory body
The short version

What changed, and why it matters

This commit fixes a bug where retrying a BOLT12 offer payment could accidentally pay the same offer twice. It adds an idempotency check using an external_id so that retries return the original payment instead of creating a duplicate, while still allowing intentional repeat payments with a new ID. The change is defensive and reduces financial loss risk from duplicate spends.

Recommended action

Deploy this patch to prevent duplicate BOLT12 offer spends. Ensure API consumers understand that external_id must be stable for retries and changed for intentional repeats or post-failure retries. Review monitoring for PaymentError responses related to external_id conflicts.

Security signals we found

01

Duplicate payment prevention for BOLT12 offers

02

Idempotency keyed on wallet_id + external_id

03

Conflict detection when external_id reused with different payment details

04

Failed offer payments require new external_id to retry

05

Wallet-level scoping of external_id for outgoing payments

Risk score

Why this scored 60/100

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