Description
Is your feature request related to a problem? Please describe.
It is one building block to make pathfinding more efficient.
Problem
The pathfinder searches for a route r
that minimizes fees(r) + attempt_costs(r) / success_probability(r)
. Currently, there is no way to influence the terms fees(r)
and attempt_costs(r)
in a route-specific manner. Furthermore, the attempt costs only depend on the amount and are independent of the route.
Via XImportMissionControl, it is only possible to influence the success_probability
. There is a lack of flexibility to address the following aspects within the scope of pathfinding:
- Consideration of fees on the source channels of payments as economic opportunity costs. For single-shard payments, one can offset these costs against the fee limit by restricting to a single outgoing channel. However, when using multiple outgoing channels and MPPs, there is currently no way to account for these costs.
- There is currently no way to penalize slightly flaky nodes with cost surcharges, e.g., to make it less likely for multiple such peers to be included in a route. Such peers can currently only be completely excluded or not.
Describe the solution you'd like
To avoid complex models for surcharges on the terms fees(r)
and attempt_costs(r)
in lnd, I would prefer an API for fee deltas.
The API should allow specifying absolute and relative surcharges for fees and attempt costs on a per-node-pair basis. Additionally, there should be default values applied for node pairs without specified surcharges.
For even greater flexibility, one could also provide namespaces with different parameterizations.
Describe alternatives you've considered
None
Additional context
As I assume that with appropriate parameterization of such an API, I can make my rebalancing both more CPU-efficient and more cost-effective, I will begin working on a proof of concept in the coming weeks (in memory only, without any data persistence). Unless someone is already actively working on such an API, in which case please let me know.
Issues #10019 and #10020 are related in this context.
Feedback welcome.
Best regards,
Feelancer21