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

Consider prior contributions when filtering unique inputs/outputs

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

73/100 · Adequate
Consider prior contributions when filtering unique inputs/outputs

When funding_contributed is called while a splice negotiation is already
in progress, unique contributions are computed to determine what to
return via FailSplice or DiscardFunding. Without considering negotiated
candidates stored in PendingFunding::contributions, UTXOs locked in
earlier candidates could be incorrectly returned as reclaimable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This patch fixes a bug in the Lightning Dev Kit's splicing feature. When a user tries to add funds to a channel while another splice negotiation is already ongoing, the code could mistakenly treat coins that are already locked into the earlier splice as 'reclaimable.' That could let a user discard or reclaim UTXOs that should stay reserved, potentially causing inconsistent channel state or loss of funds in edge cases.

Recommended action

Review and merge the patch; add regression tests covering overlapping splice contributions where prior candidates hold UTXOs, and verify that `FailSplice`/`DiscardFunding` returns only genuinely unique/unused inputs and outputs.

Security signals we found

01

UTXO double-counting / incorrect release of locked funds during concurrent splice negotiations

02

State inconsistency between pending splice contributions and current negotiation context

03

Logic bug in channel funding/splicing lifecycle

Risk score

Why this scored 59/100

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