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

Avoid negative on-the-fly funding fee (#3189)

Public commit record

What the developer wrote

Authored by Bastien Teinturier

88/100 · Strong
Avoid negative on-the-fly funding fee (#3189)

Since we don't have access to channel params in the `Peer` actor, we
don't know the remote `htlc_minimum` when receiving a splice. This may
lead to cases where we later fail because we end up with a negative
funding fee, which doesn't make any sense.

To avoid those failures, we hard-code the `htlc_minimum` value used by
Phoenix (which is the only consumer of this protocol so far) and use
the max with our local `htlc_minimum`.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes a bug in Eclair's on-the-fly funding feature where a payment fee could be calculated as a negative number. The patch hard-codes a minimum HTLC value used by Phoenix and prevents the fee from dropping below zero. It is a defensive fix that avoids later validation failures rather than a clear exploitable vulnerability.

Recommended action

Review whether hard-coding 1000 msat is appropriate for all future consumers of on-the-fly funding, and consider passing the actual remote htlc_minimum to the Peer actor for more robust validation. Monitor for any related channel failures or splice rejections.

Security signals we found

01

Negative funding fee calculation prevented by clamping to zero

02

Missing remote channel parameter (htlc_minimum) addressed with hard-coded Phoenix value

03

On-the-fly splice validation logic changed

04

Log message corrected from 'open_channel2' to 'splice_init'

Risk score

Why this scored 36/100

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