Just in Time Routing (JIT-Routing) and a channel rebalancing heuristic as an add on for improved routing success in BOLT 1.0



Summary:

In the email thread, Rene Pickhardt responds to concerns raised by ZmnSCPxj and Ariel Lorenzo-Luaces regarding his proposal for Just-In-Time (JIT) routing to reduce payment failures and increase privacy on the Lightning Network.ZmnSCPxj suggested introducing a 'success_rate' for JIT routing, but Rene advises against including it in the protocol. He believes that rebalancing should only take place when liquidity is actually needed, and it is up to the node to decide whether or not to engage in the JIT-rebalancing operation. The protocol should not make economical decisions for the node.Regarding Ariel's concern about a spoofed-payment attack, Rene suggests reusing the payment hash with JIT Routing, which could mitigate probing-based network analysis and reduce payment failures. However, he notes some technical challenges that would need to be addressed, such as the possibility of a deadlock problem when using the same payment hash for JIT routing.To fix this, Rene proposes a MUST-rule to create a new channel state with a new offer from the node if it offers an HTLC to a partner from whom it already received an HTLC of smaller value. Rene also suggests setting either the base-AMP feature flag or creating a new one for JIT-routing, which would signal that more HTLCs are coming, needing to be combined to forward an onion. Alternatively, nodes could do a local base-AMP to the next recipient instead of forwarding the onion.Despite these challenges, Rene believes that reusing the payment hash is desirable, especially if they can prove that it is not a problem and address the technical challenges described in the email.In a message to the Lightning-dev mailing list, ZmnSCPxj proposed a rule for determining when rebalancing would be beneficial to a node. The rule involves comparing the fee offered for forwarding (`offered_fee_amount`) with the estimated probability of success after forwarding (`success_rate`) and the cost of rebalancing (`rebalancing_fee_amount`). If `offered_fee_amount * success_rate - rebalancing_fee_amount > 0`, then it is profitable to engage in JIT-routing. The success rate can be computed statically from node data, but it is better for the node to augment this information over time with its own experienced success rates for all forwards. The email also includes information on how to compute the fee amounts and provides links to the Lightning-dev mailing list for further discussion.


Updated on: 2023-06-02T17:42:36.884884+00:00