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

Use floor division for the spec's 25/24 RBF feerate rule

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

73/100 · Adequate
Use floor division for the spec's 25/24 RBF feerate rule

The spec says the 25/24 multiplicative feerate is "rounded down", but
min_rbf_feerate used ceiling division. This made the computed minimum 1
sat/kwu too high when prev * 25 is not evenly divisible by 24, which
could reject valid counterparty feerates.

Co-Authored-By: Claude Opus 4.6 (1M context) <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 commit fixes a tiny but real arithmetic bug in how Lightning splicing/RBF transactions decide the minimum acceptable fee rate. The code was using ceiling division (rounding up) when the Lightning specification says to round down. That made the minimum fee 1 satoshi per kiloweight-unit too high in some cases, which could cause a node to wrongly reject a counterparty's valid fee-bump attempt. The fix changes one division operation from 'round up' to 'round down' and updates the related tests.

Recommended action

Apply the patch. Review whether any other implementations or branches use ceiling division for the same rule. Consider whether the 1 sat/kwu mismatch could have caused interoperability issues with other Lightning nodes during splicing/RBF.

Security signals we found

01

Spec-compliance bug in fee-rate validation

02

Could cause wrongful rejection of counterparty RBF/splice attempts

03

Risk of channel disruption or failed fee-bumping, not direct fund theft

04

Fix is a one-line arithmetic change with test updates

Risk score

Why this scored 49/100

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