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

lnwallet: detect and handle noop HTLCs

Public commit record

What the developer wrote

Authored by George Tsagkarelis

68/100 · Adequate
lnwallet: detect and handle noop HTLCs

We update the lightning channel state machine in some key areas. If the
noop TLV is set in the update_add_htlc custom records then we change the
entry type to noop. When settling the HTLC if the type is noop we credit
the satoshi amount back to the sender.
✓ 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 new 'no-op HTLC' feature to LND's lightning channel state machine. A no-op HTLC is a special payment-like message that, when settled, may credit the amount back to the sender rather than transferring it to the receiver. It is only intended for channels using a custom tapscript root and is triggered by external software via custom TLV records. The change touches balance calculations, settlement logic, and how HTLCs are restored from disk. Because it alters fundamental accounting rules, any bug in the logic could affect funds, but the commit itself is a feature addition with guardrails (reserve checks, tapscript-root gating) rather than a clear-cut fix for a known vulnerability.

Recommended action

Treat this as a high-risk feature change requiring careful review of the reserve-check arithmetic and the no-op settle flag propagation. Test edge cases around force closures, revocation, and state restoration where NoOpAdd HTLCs are reloaded from disk. If running LND with custom asset channels, ensure this commit is included and monitor for follow-up fixes.

Security signals we found

01

Alters core channel balance accounting and settlement flow

02

Introduces new HTLC entry type that can reverse amount direction on settle

03

Gated by channel reserve check and tapscript-root channel type

04

Custom TLV presence alone does not trigger no-op unless channel has tapscript root

05

Changes multiple EntryType == Add comparisons to isAdd() helper, expanding code paths that treat NoOpAdd as an add

06

No explicit security advisory, CVE, or incident disclosure supplied

Risk score

Why this scored 43/100

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