pull down to refresh

It seems like a fairly trivial exercise to determine the exact balances of channels. I haven't written the script yet, but it would consist of attempting a bunch of different size payments with the final destination back to my node which I forcefully always fail as the last hop. I can figure out which hops said "yes, I have enough balance for that" and incur no cost or risk to getting that information.
So given this, I have decided on my node to just update max_htlc_msat to a figure generally just below my current local balance.
In fact, I have been pondering as a non-dev whether we can add another optional node operator flag to LND which signals "public channel balance broadcasts" and other nodes can use this information as they wish.
Some routing would become immediately much more efficient, especially if people choose "only use known balances" in a route. For greater privacy, people could choose "all channels" of course. It's kind of like we have the option to use TOR or not.
I don't know how much more efficient payments would be if we knew all the balances of channels, but I suspect it will be a lot more efficient. And fee discovery would also be improved, since we know that "0 ppm" on a zero balance channel isn't a relevant or competitive fee.
Would people use this flag?
The second feature I was thinking of was the ability to set fee rate formula based on that balance. If not public, at least a server-side formula. What happens sometimes is that my fee updating script isn't fast enough to catch a sudden drain event. Maybe I can run it after each TX, but we know gossip is a pain. So it might be interesting to tell other nodes that I have a dynamic fee on this channel which changes based on the broadcasted balance, so if they want to drain the channel, it's going to cost a lot more sats. I don't know, haven't fleshed out the details, but the point is to have dynamically changing fees without spamming gossip channel updates to the whole network.
This is a great point. You can get much more accurate data by just running test transactions... I really like the routing efficiency so I'm going to go ahead and dynamically updating my max_htlc_msat settings to just under my side liquidity every hour (if the balance changes).
reply