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