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

Reject offer_amount of 0 as invalid per BOLT 12

Public commit record

What the developer wrote

Authored by Vincenzo Palazzo

76/100 · Adequate
Reject offer_amount of 0 as invalid per BOLT 12

Per the spec clarification in https://github.com/lightning/bolts/pull/1316:
- Writers MUST set offer_amount greater than zero when present
- Readers MUST NOT respond to offers where offer_amount is zero

Reject amount_msats(0) in the builder with InvalidAmount, and reject
parsed offers with amount=0 (with or without currency) during TLV
deserialization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit tightens validation of BOLT 12 Lightning offers so that an offer cannot specify a payment amount of zero. Previously, zero-amount offers could be built or parsed successfully, which the BOLT 12 specification now forbids. The change prevents users or automated systems from accidentally creating or accepting offers that request no payment, which could be used to confuse wallets, trigger unexpected behavior, or probe nodes.

Recommended action

No immediate action required beyond normal review and merge. Users should ensure they are running a version that includes this validation if they process untrusted BOLT 12 offers.

Security signals we found

01

Spec-compliance validation change

02

Input sanitization for parsed offer TLVs

03

Builder hardening against zero-amount offers

04

Test coverage added for malformed offer vectors

Risk score

Why this scored 39/100

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