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

Validate reserved fees on both commitments

Public commit record

What the developer wrote

Authored by Leo Nash

80/100 · Strong
Validate reserved fees on both commitments

The local and remote commitments may have different dust limits, which
can cause each commitment to have a different transaction fee.

Therefore when we reserve commitment transaction fees in
`get_available_balances`, we must ensure that we read the maximum of the
transaction fees on the local and the remote commitments. Otherwise, we
may have not reserved enough fees to ensure that our next proposed
channel state update is onside.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode
The short version

What changed, and why it matters

This commit fixes a fee-reservation bug in a Lightning Network node implementation. When a node calculates how much money it can still send through a channel, it must set aside enough funds to pay the on-chain transaction fee if the channel later closes. Previously, the calculation only considered the node's own view of the commitment transaction. Because the two channel partners can agree on different 'dust limits,' the actual fee on the partner's version of the commitment can be higher. If the node did not reserve enough, it could propose a payment that is valid by its own numbers but violates the protocol when the partner checks it, potentially causing the channel update to be rejected or the channel to become inconsistent. The patch now reserves the larger of the two possible fees.

Recommended action

Review the updated fee-reservation logic for correctness under all channel types and dust-limit combinations; run the new unit tests; consider whether any other balance-reporting paths (e.g., `ChannelDetails` fields) need similar dual-commitment treatment.

Security signals we found

01

Fee-reservation miscalculation in channel balance availability

02

Asymmetric commitment transaction fees due to differing dust limits

03

Potential protocol violation when proposing channel state updates

04

Fix validated by new unit tests covering both funder/fundee dust asymmetry

Risk score

Why this scored 64/100

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