Proof of Concept implementation of the Dijkstra Overpayment MPP Splitter#36
Open
renepickhardt wants to merge 1 commit into
Open
Proof of Concept implementation of the Dijkstra Overpayment MPP Splitter#36renepickhardt wants to merge 1 commit into
renepickhardt wants to merge 1 commit into
Conversation
…ter for redundant over payments. Use with caution and not in production. This is WIP
Owner
Author
|
An example where this patch is being used can be seen at: https://github.com/renepickhardt/Maximum-Expected-Value-Flows-For-Redundant-Overpayments/blob/main/code/Maximizing%20expected%20values.ipynb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces 2 things:
WARNING!!! very experimental work in progress! Only use with caution and wait for the proper release
The
DijkstraOverPaymentclass aims to find Dijkstra paths in a pragmatic way for redundant overpayments.In particular it is a proof of concept to generate an MPP-Split in an ad hoc way that seems to be more
resonable than existing splitters which either do devide an conquorer or split to a certain amount or split
to a predefined number of parts.
This splitter finds low cost paths and greedly allocates as many sats as long as the reliability stays abvove a threshold
The main ideas are the following:
With respect to the cost function for candidate selection:
We use dijkstra to compute candidate paths as shortest paths with respect to our cost function
1.) Use a cost function for a unit that is the combination of
linearized routing costandlinearized uncertainty cost2.) smooth the routing cost (currently laplace smoothing with
+100. The exact value needs to be found3.)
cost = (ppm + 100) * 1/capacity4.) after a path is planned increase cost of each edge with a multiplier
with respect to allocation of funds to paths
The cost function favors paths with low routing costs thus the only question is how many sats to allocate?
The following idea shall be used for motivation:
x%lbe the length of the planned path andcbe the capacity of the smallest channel.s = (c+1-a)/(c+1)is the success probability for the allocated amountas >= x ** (1/l)which means the path has a probability of at leastxsat equality we solve fora-->a = (c+1) - s*(c+1) = (c+1)*(1-s)asats to the candidate pathNumber of generated / planned candidate paths
known short commings: