cryptosharks131 / lndg

Lite GUI web interface to analyze lnd data and leverage the backend database for automation tools around rebalancing and other basic maintenance tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: dynamically limit maxHTLC

thool2b3 opened this issue · comments

To minimize failed HTLCs it would make sense to limit maxHTLC to channel balance plus channel reserve.
Please consider to add functionality to control maxHTLC dynamically based on channel balance.
Here is a proposal how it could be implemented:

  • maxHTLC set in Advanced Settings should still not be exceeded even when all liquidity is on my side
  • decrease maxHTLC dynamically down to zero when channel balance drops below a minimum value. maxHTLC could be calculated like this: channel reserve + minimum value + safety margin.
  • Channel reserve is given by LND. Parameters minimum value and safety margin should have a default value but could be changed individually.
  • I am not sure if it also makes sense to disable the channel when calculated maxHTLC drops to 0? Perhaps this could be optionally checked by the user.

Thank you for considering this feature request.

  • this should be elective policy (i.e. default = disabled)
  • to prevent excessive gossip this should be done once ever x hours (x can be configurable setting, suggested default 24 h)
  • Instead of using exact channel balance it could be nearest multiple of 2 or something like that.
  • disable/enable channel does impact reputation and causes confusion between peers so can be avoided.

@BhaagBoseDK, thanks for your comments and the additions which I am thankful for.