Thread
Payments over LN can happen in two ways:
1. Direct (node to node)
2. Indirect (node THROUGH node)
When sending an indirect payment, i.e, you don’t have a channel open with the recipient, your payment is ‘routed’ through an intermediate node or nodes.
1. Direct (node to node)
2. Indirect (node THROUGH node)
When sending an indirect payment, i.e, you don’t have a channel open with the recipient, your payment is ‘routed’ through an intermediate node or nodes.
But with 75,000 channels & 15,000 nodes, how do we choose the best route to send the payment?
@lightning’s LND implementation currently uses Dijkstra's algorithm for pathfinding (not the exact algo, but similar).
@lightning’s LND implementation currently uses Dijkstra's algorithm for pathfinding (not the exact algo, but similar).
@lightning Dijkstra’s algorithm, published in 1959, is designed to find the shortest path between two nodes on a graph.
@lightning This illustration shows the pathfinding algorithm searching from a start point (bottom left red dot) to a destination (upper right green dot)
@lightning Every time you send a transaction on LN, your node searches the graph for the shortest possible route.
@lightning But what if we could optimize this algorithm to make it faster, cheaper, & more reliable?
This is what Pickhardt Payments do.
This is what Pickhardt Payments do.
@lightning @renepickhardt is an independent researcher whose goal is to improve the Lightning Network.
His body of work is prolific but he’s most well-known for his pathfinding optimization algorithm.
Pickhardt Payments use probabilities to determine the likelihood of payment_success.
His body of work is prolific but he’s most well-known for his pathfinding optimization algorithm.
Pickhardt Payments use probabilities to determine the likelihood of payment_success.
@lightning @renepickhardt By using a probabilistic model, the Pickhardt algo can estimate the amount of liquidity in any given channel on the graph.
The payment is then sent through the channels with the most liquidity, optimizing for reliability rather than speed.
The payment is then sent through the channels with the most liquidity, optimizing for reliability rather than speed.
@lightning @renepickhardt When we use probabilities to optimize for payment reliability, we can do much larger payments across LN.
Payments that were previously impossible.
Payments that were previously impossible.
@lightning @renepickhardt Imagine sending $10,000 over Lightning instantly and for a fraction of a penny.
With Pickhardt Payments, that’s now a possibility.
With Pickhardt Payments, that’s now a possibility.
@lightning @renepickhardt In their research paper, @renepickhart and @stefanwouldgo said this:
“Early experiments indicate that our approach increases the size of payments that can be reliably delivered by several orders of magnitude compared to the current state of the art”
“Early experiments indicate that our approach increases the size of payments that can be reliably delivered by several orders of magnitude compared to the current state of the art”
@lightning @renepickhardt @renepickhart @stefanwouldgo And after implementing the algorithm, @Core_LN saw their time to complete & payment failure rates cut in half.
Speed doubled.
All with a single API call.
Speed doubled.
All with a single API call.
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN Pickhardt payments are a win-win for LN.
Node operators make more profit, and users get better reliability & can send larger payments.
Node operators make more profit, and users get better reliability & can send larger payments.
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN Network optimizations are non-linear because they follow Metcalfe’s law (the value of a network is proportional to the square of its users).
So when we increase payment reliability, we get more liquidity on the network, which in turn leads to even better reliability 🔁
So when we increase payment reliability, we get more liquidity on the network, which in turn leads to even better reliability 🔁
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN So how can we use #PickhardtPayments today?
LND-manageJ by @@c_otto83 supports Pickhardt Payments:
LND-manageJ by @@c_otto83 supports Pickhardt Payments:
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN @c_otto83 Here's a patch for @lightningdevkit written in Rust:
github.com/lightningdevkit/rust-lightning/pull/1668
github.com/lightningdevkit/rust-lightning/pull/1668
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN @c_otto83 @lightningdevkit And there is a python library where you can test & build your own version:
github.com/renepickhardt/pickhardtpayments
github.com/renepickhardt/pickhardtpayments
@lightning @renepickhardt @renepickhart @stefanwouldgo @Core_LN @c_otto83 @lightningdevkit That’s it!
Thanks for reading, we hope you’re as excited about this as we are.
Like and follow for more LN content⚡️
Thanks for reading, we hope you’re as excited about this as we are.
Like and follow for more LN content⚡️