Post
Topic
Board Development & Technical Discussion
Re: The Lightning Network node experience
by
TheJuice
on 22/11/2021, 03:26:23 UTC
3) My rebalance script targets 2M sats on each side; just makes the scripting easy with no small channels.

What does your rebalance script do? Does it adjust fees once one side of a channel reaches a certain point? Or does it send a invoice to yourself that is paid to a channel with a high balance to a channel with a low balance?

I have 2 -- one dynamically adjust fees based on the proportion of the sats on each side (and some other parameters). The rebalance script looks to get atleast 2M sats outgoing on each channel -- however it will only rebalance if the expected fees from future transactions are higher (by 3x) than the fee to rebalance.
Very interesting. How does it anticipate the expected future fees? (what assumptions does it make)

I suspect that when LN has an increased adoption rate, the most successful LN node operators will automate their channel balances such that they are balanced (no pun intended), and that there is a low risk channels will be closed due to an unbalanced channel.

Let's say I have a channel to node A. I set that fee to say 100 sats per 1M sats. If that channel is empty the script is confident that if it was repleted it would make 100 sats per 1M again. So it looks for a rebalance path that would be less than 40 sats/1M (I playing around with the cutoffs, but thats the general approach).