Bitcoin Forum
February 01, 2026, 12:46:13 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Understanding electrum fees and lightning channel reserves  (Read 53 times)
electrumiyut (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 6


View Profile
January 14, 2026, 07:52:20 AM
Last edit: January 14, 2026, 09:28:28 AM by electrumiyut
Merited by LoyceV (6)
 #1

I am working on a script to automate opening/closing channels in an Electrum wallet and my head is spinning trying to figure out how much Electrum considers reasonable to spend when opening a channel. I have dug through the code to the extent I can to figure out how this works.

There's some things I need to know to calculate the channel opening amount:
  • How much electrum keeps in the channel reserve in the channel (looks to be the larger of 1% of channel size or the dust limit)
  • What the dust limit is (546 is the highest hardcoded value I could see in bitcoin.py)
  • Minimum channel size (appears to be 60,000 sats but can be configured to a lower 20,000 sats if you have an electrum daemon like self.electrum.lnutil.MIN_FUNDING_SAT)
What I can't figure out is:
  • How much electrum insists on having in on-chain funds to make the channel, cover fees, and have enough left over (aside from the channel amount itself). Testing on some wallets, it seems to be a little over 10,000 sats. Is this in total? Per channel? I don't know. Is there a way to lower this number? 10,000 sats seems a little high, we haven't had a tx fee like that in years. Given the large size, I am assuming this isn't dynamically calculated from the fee rate but I could be wrong.
  • Is there some way to modify these values including MIN_FUNDING_SAT via the JSON-RPC API? Or otherwise? The only way I've found to modify them so far is to run electrum directly as a python library, but I'd rather not have to do that.

I am also confused by this. I have a channel and in the channel info window I see :
Local balance: 200,000 sats
Remote balance: 0 sats
Can send: 191,512 sat
Local reserve: 2000 sat
Remote reserve: 2000 sat
Local dust limit: 546 sat
Remote dust limit: 354 sat

No matter how I combine these numbers, I can't seem to get the 191,512 sat number shown in the "Can send" field. What am I missing? How do I calculate that number? It doesn't appear in list_channels() when using the console/API.
Thank you anybody who can help
nc50lc
Legendary
*
Offline Offline

Activity: 3038
Merit: 8298


Self-proclaimed Genius


View Profile
January 15, 2026, 07:00:13 AM
 #2

I am also confused by this. I have a channel and in the channel info window I see :
-snip-
No matter how I combine these numbers, I can't seem to get the 191,512 sat number shown in the "Can send" field. What am I missing? How do I calculate that number? It doesn't appear in list_channels() when using the console/API.
That must be because of the hidden "fee spike buffer".
There's an open issue regarding that due to some too low "Can Send" amounts when the average fee was high: github.com/spesmilo/electrum/issues/8413

I can't comment on the main query though.

███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
.
.Duelbits PREDICT..
█████████████████████████
█████████████████████████
███████████▀▀░░░░▀▀██████
██████████░░▄████▄░░████
█████████░░████████░░████
█████████░░████████░░████
█████████▄▀██████▀▄████
████████▀▀░░░▀▀▀▀░░▄█████
██████▀░░░░██▄▄▄▄████████
████▀░░░░▄███████████████
█████▄▄█████████████████
█████████████████████████
█████████████████████████
.
.WHERE EVERYTHING IS A MARKET..
█████
██
██







██
██
██████
Will Bitcoin hit $200,000
before January 1st 2027?

    No @1.15         Yes @6.00    
█████
██
██







██
██
██████

  CHECK MORE > 
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!