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

swaps: add sanity-check for total swap costs

Public commit record

What the developer wrote

Authored by SomberNight

45/100 · Thin
swaps: add sanity-check for total swap costs
✓ Descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit adds a safety guard for Electrum's submarine swaps. Before finalizing a swap, the wallet now checks whether the fees/costs look wildly unreasonable (for example, losing more than 25% of the amount, or over 1 million satoshi in absolute terms). If the costs look insane, the wallet stops and shows the user an error instead of proceeding. The change is defensive and does not appear to fix a known exploited bug, but it reduces the risk of a malicious or misconfigured swap server causing the user to lose funds.

Recommended action

No immediate action required. Users and operators should ensure they are running a version that includes this sanity check if they perform submarine swaps. Review whether the chosen thresholds (25% / 15% + 1M sat) are appropriate for your use case.

Security signals we found

01

New client-side validation of swap costs

02

Raises user-facing exception to block execution

03

Catches swap-server error class in UI

04

Defensive hardening, not a vulnerability patch

Risk score

Why this scored 49/100

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