`htlc_maximum_msat` as a valve for flow control on the Lightning Network



Summary:

In a recent post, Lightning Network developer Rene Pickhardt shared his research results exploring how the `htlc_maximum_msat` setting can be used as a control valve to regulate "pressure" and mitigate channel depletion caused by drain via Markov Models. He showed how expected payment failure rates per channel can drop significantly by up to an order of magnitude if channels set up proper asymmetric `htlc_maximum_msat` pairs. The article provides theoretical models and experimental algorithmic ideas for node operators to find decent `htlc_maximum_msat` values in a greedy fashion. One of the algorithms does not require knowledge of the drain or payment size distribution but looks at the liquidity distribution in the channel at the last x routing attempts and adjusts the `htlc_maximum_msat` value if the distribution is too far from a uniform distribution. The findings are relevant mainly for node operators and LSPs. The idea of using `htlc_maximum_msat` as a control valve is not novel and has been heavily used in fluid networks.


Updated on: 2023-06-03T09:51:01.288587+00:00