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

Include spliceable balance in every FundingTemplate

Public commit record

What the developer wrote

Authored by Wilmer Paulino

73/100 · Adequate
Include spliceable balance in every FundingTemplate

There's no reason not to do so, and it allows us to fail earlier when
the user's net contribution exceeds their spliceable balance.
✓ Specific, descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit tightens a safety check in Lightning Dev Kit's splicing code. When a user tries to splice funds out of a channel, the library now records how much balance is actually spliceable right at the start and rejects requests that would overdraw it earlier in the process. Previously, that check happened later, so a user could construct a splice request that looked valid locally but would only be rejected when sent to the peer. The change also removes an internal helper type and carries the spliceable balance directly in the funding template. It is a defensive hardening change, not an obvious exploitable bug fix, but it prevents a class of invalid splice-out attempts from proceeding further.

Recommended action

Review as normal defensive hardening. No urgent action required unless the project is concerned about invalid splice-out attempts being constructed locally. Ensure downstream callers handle the new InvalidSpliceValue error path gracefully. Consider whether any documentation or changelog should mention the earlier validation.

Security signals we found

01

Early validation of splice-out against holder balance

02

Removal of PriorContribution wrapper and direct storage of spliceable_balance in FundingTemplate

03

New InvalidSpliceValue error path for overdrawn splice-out

04

Test updates showing invalid splice-outs are now rejected at contribution-build time rather than at funding_contributed time

05

Test explicitly notes stale template can bypass the new early enforcement

Risk score

Why this scored 34/100

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