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

Mixed mode splicing

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

51/100 · Thin
Mixed mode splicing

Some splicing use cases require to simultaneously splice in and out in
the same splice transaction. Add support for such splices using the
funding inputs to pay the appropriate fees just like the splice-in case,
opposed to using the channel value like the splice-out case. This
requires using the contributed input value when checking if the inputs
are sufficient to cover fees, not the net contributed value. The latter
may be negative in the net splice-out case.
✓ Subject identifies a change✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit adds support for 'mixed mode splicing' in the Lightning Dev Kit, where a user can add funds to a channel and remove funds in the same transaction. The change fixes how fees are calculated so that the check uses the actual value of inputs being added, not just the net difference between added and removed funds. Previously, a net splice-out (more removed than added) could have caused the fee check to behave incorrectly because it used a negative net value. The commit also adds new tests for this behavior.

Recommended action

Review the updated fee and change calculations for arithmetic consistency and edge cases, particularly around Amount/SignedAmount conversions, dust limits, and the assert!(contributed_input_value > SignedAmount::ZERO). Ensure the new mixed-mode path is covered by fuzzing or additional adversarial tests.

Security signals we found

01

Fee sufficiency check previously used net signed contribution, which could be negative in splice-out cases

02

New mixed-mode splice path combines splice-in inputs and splice-out outputs in one transaction

03

Change calculation logic updated to derive contributed input value from funding contribution plus output value

04

Tests added covering net splice-in, net splice-out, and insufficient-input fee cases

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.