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

Fix comparison of utxos in the balance (#3160)

Public commit record

What the developer wrote

Authored by pm47

68/100 · Adequate
Fix comparison of utxos in the balance (#3160)

The `Utxo` case class has many fields, for comparison we must use the
`outPoint`.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides an explanatory body✓ Links an issue, advisory, or supporting reference
The short version

What changed, and why it matters

This commit fixes how the Eclair Lightning node compares its on-chain Bitcoin funds (UTXOs) when computing balance changes. Previously, it compared entire UTXO objects, which include fields that can change even when the same coin is still owned (for example, confirmation count). This could cause the node to incorrectly think UTXOs were added or removed, producing noisy or misleading balance logs and metrics. The fix compares UTXOs only by their unique identifier (outPoint), which is the correct way to tell whether the same coin is still present. There is no direct evidence in the commit that this is exploitable by an attacker or that it causes loss of funds.

Recommended action

Treat as a routine correctness/logging fix. Review whether any downstream alerting, accounting, or channel-force-close logic consumes these UTXO diff metrics and could react to the previously spurious add/remove events. No urgent security patch is indicated by the diff alone.

Security signals we found

01

Incorrect equality/comparison of financial objects could inflate or suppress balance-change metrics

02

Fix moves from full-object Set comparison to stable outPoint-keyed Map comparison

03

No input validation, serialization, cryptography, or authorization changes observed

04

No evidence of remote attacker control over affected data path

Risk score

Why this scored 21/100

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