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

Use 72 WU instead of 73 WU for signature weight

Public commit record

What the developer wrote

Authored by Jeffrey Czyz

73/100 · Adequate
Use 72 WU instead of 73 WU for signature weight

When estimating signature weight, 73 WU was used in some places while 72
WU was used in others. Consistently use 72 WU and replace hardcoded
values with constants. 73 WU signatures are non-standard and won't be
produced by LDK. Additionally, using 73 WU along with grind_signatures
adjustment is nonsensical.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit fixes an internal inconsistency in how LDK estimates Bitcoin transaction fees. Some parts of the code assumed signatures could be 73 weight units (WU) long, while others used 72 WU. Since 73 WU signatures are non-standard and LDK never produces them, the 73 WU assumption caused fee estimates to be slightly too high. The patch standardizes on 72 WU and replaces magic numbers with named constants. The practical effect is slightly lower, more accurate fee estimates for Lightning channel funding and splicing transactions. It is not a direct vulnerability fix, but incorrect fee estimation could in edge cases cause transactions to be over-funded or, more importantly, could contribute to fee-related negotiation failures.

Recommended action

Review and merge. This is a correctness and maintainability improvement with minor security relevance. Consider whether any downstream consumers rely on the previous slightly-higher fee estimates, and verify that the new constants match actual maximum standard signature sizes under all feature combinations (including grind_signatures).

Security signals we found

01

Inconsistent fee/weight estimation between components

02

Use of non-standard signature size (73 WU) in estimates

03

Potential overestimation of transaction fees

04

Constants introduced to prevent future divergence

05

No direct cryptographic or memory-safety bug

Risk score

Why this scored 36/100

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