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