Clara Shikhelman [ARCHIVE] on Nostr: 📅 Original date posted:2021-11-15 📝 Original message: Hi Joost, A quick way to ...
📅 Original date posted:2021-11-15
📝 Original message:
Hi Joost,
A quick way to resolve this is to normalize the payment fees to a [0,1]
scale. Two natural ways to do this are the following.
0 in both of them is some maximum set by the user (maybe with some
reasonable default), 1 could be either the cheapest path or simply 0 sat.
Once we have normalized the fees to a [0,1] scale, we can proceed.
Let [image: \alpha] be the chosen balance parameter, [image: f] the
fee and [image:
p] the success probability. Then the score of a channel will be [image:
\alpha\cdot f + (1-\alpha)\cdot p]
Clara
On Mon, Nov 15, 2021 at 10:26 AM Joost Jager <joost.jager at gmail.com> wrote:
> In Lightning pathfinding the two main variables to optimize for are
> routing fee and reliability. Routing fee is concrete. It is the sat amount
> that is paid when a payment succeeds. Reliability is a property of a route
> that can be expressed as a probability. The probability that a route will
> be successful.
>
> During pathfinding, route options are compared against each other. So for
> example:
>
> Route A: fee 10 sat, success probability 50%
> Route B: fee 20 sat, success probability 80%
>
> Which one is the better route? That depends on user preference. A patient
> user will probably go for route A in the hope of saving on fees whereas for
> a time-sensitive payment route B looks better.
>
> It would be great to offer this trade-off to the user in a simple way.
> Preferably a single [0, 1] value that controls the selection process. At 0,
> the route is only optimized for fees and probabilities are ignored
> completely. At 1, the route is only optimized for reliability and fees are
> ignored completely.
>
> But how to choose between the routes A and B for a value somewhere in
> between 0 and 1? For example 0.5 - perfect balance between reliability and
> fee. But what does that mean exactly?
>
> Anyone got an idea on how to approach this best? I am looking for a simple
> formula to decide between routes, preferably with a reasonably sound
> probability-theoretical basis (whatever that means).
>
> Joost
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211115/7e7f7ab4/attachment.html>
📝 Original message:
Hi Joost,
A quick way to resolve this is to normalize the payment fees to a [0,1]
scale. Two natural ways to do this are the following.
0 in both of them is some maximum set by the user (maybe with some
reasonable default), 1 could be either the cheapest path or simply 0 sat.
Once we have normalized the fees to a [0,1] scale, we can proceed.
Let [image: \alpha] be the chosen balance parameter, [image: f] the
fee and [image:
p] the success probability. Then the score of a channel will be [image:
\alpha\cdot f + (1-\alpha)\cdot p]
Clara
On Mon, Nov 15, 2021 at 10:26 AM Joost Jager <joost.jager at gmail.com> wrote:
> In Lightning pathfinding the two main variables to optimize for are
> routing fee and reliability. Routing fee is concrete. It is the sat amount
> that is paid when a payment succeeds. Reliability is a property of a route
> that can be expressed as a probability. The probability that a route will
> be successful.
>
> During pathfinding, route options are compared against each other. So for
> example:
>
> Route A: fee 10 sat, success probability 50%
> Route B: fee 20 sat, success probability 80%
>
> Which one is the better route? That depends on user preference. A patient
> user will probably go for route A in the hope of saving on fees whereas for
> a time-sensitive payment route B looks better.
>
> It would be great to offer this trade-off to the user in a simple way.
> Preferably a single [0, 1] value that controls the selection process. At 0,
> the route is only optimized for fees and probabilities are ignored
> completely. At 1, the route is only optimized for reliability and fees are
> ignored completely.
>
> But how to choose between the routes A and B for a value somewhere in
> between 0 and 1? For example 0.5 - perfect balance between reliability and
> fee. But what does that mean exactly?
>
> Anyone got an idea on how to approach this best? I am looking for a simple
> formula to decide between routes, preferably with a reasonably sound
> probability-theoretical basis (whatever that means).
>
> Joost
> _______________________________________________
> Lightning-dev mailing list
> Lightning-dev at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20211115/7e7f7ab4/attachment.html>