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

swaps: add sanity check to reverse swap mining fee

Public commit record

What the developer wrote

Authored by f321x

50/100 · Thin
swaps: add sanity check to reverse swap mining fee
✓ Specific, descriptive subject✓ Names a concrete action or component! No meaningful explanatory body
The short version

What changed, and why it matters

This commit tightens how Electrum handles reverse submarine swaps (a way to move funds from Lightning back to on-chain Bitcoin). Previously, the swap code relied on the current provider fee stored in memory, which could change between the moment the user saw a quote and the moment the swap was executed. The patch makes the GUI and command-line pass the exact mining fee the user was shown into the swap logic, and adds a sanity check that the provider cannot charge more than twice that shown fee. This reduces the risk of a malicious or misconfigured swap provider surprising the user with unexpectedly high fees right before the swap completes.

Recommended action

Treat this as a hardening/fix commit for the reverse swap fee path. Review whether the 2x multiplier is an acceptable trust boundary, and consider adding user-visible confirmation of the exact server mining fee before swap execution. No immediate incident response is indicated by the diff alone.

Security signals we found

01

fee-invoice amount now bounded by user-visible mining fee instead of live provider state

02

GUI stops auto-updating offer/fee display after user input to prevent bait-and-switch fee changes

03

new server_mining_fee_sat parameter committed through CLI, QML, Qt, and swap manager

04

check uses 'greater than 2x' threshold, leaving a tolerance window

05

commit message explicitly notes trust assumption: server is trusted with max fee pre-payment amount

Risk score

Why this scored 59/100

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