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

Return `AvailableBalances` in `get_channel_stats`

Public commit record

What the developer wrote

Authored by Leo Nash

58/100 · Thin
Return `AvailableBalances` in `get_channel_stats`

Note that `AvailableBalances` will always refer to the holder's
balances, even when `local` is set to `false`, when calling
`TxBuilder::get_channel_stats`.
✓ Descriptive subject✓ Provides detailed explanatory context
The short version

What changed, and why it matters

This commit refactors how Lightning channel balance information is computed so that the same code path calculates both commitment statistics and available balances. The key behavioral change is that available-balance calculations now always use the holder's perspective, even when evaluating the counterparty's commitment. This is intended to prevent inconsistent or incorrect balance reporting, but the commit itself is a refactor rather than a clear-cut fix for an active vulnerability.

Recommended action

Review the new unified balance computation for correctness, particularly that using holder perspective for `AvailableBalances` when `local=false` does not under- or over-report spendable amounts. Run the updated test and any related balance/reserve tests. Consider whether this change warrants a changelog note if user-visible balance estimates changed.

Security signals we found

01

Refactor of balance-limit computation to use unified code path

02

Available balances now consistently computed from holder's perspective regardless of `local` flag

03

Debug assertion added to sanity-check reserve compliance after adding max outbound HTLC

04

Test adjustment suggests previous calculation could produce limits exceeding counterparty constraints

05

No explicit security claim, CVE, or advisory in commit message or diff

Risk score

Why this scored 28/100

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