Nevertheless, even small payments are susceptible to failure of delivery on Lightning. In that sense, increasing reliability for both small and large payments seems like a good idea.

Thinking of this problem, Lightning Network researcher and educator Rene Pickhardt began researching ways to optimize for the probability of a payment to be successful. Now, his research is bearing fruit.

Pickhardt Payments: Increasing Reliability For Lightning Payments
As explained above, the core of the reliability problem in Lightning payments is centered around liquidity. As a result, most of Pickhardt’s work tries to answer the question: Where is the liquidity?

There isn’t a single answer to that question. Worse, often there isn’t a way to be certain about it either, even when considering a single channel.

Whereas it can be trivial to determine the bitcoin capacity of a public Lightning channel, it isn’t easy to determine how that capacity is divided among its two peers — posing a challenge to correctly assess outgoing and incoming liquidity in that channel. Hence, the ability of a sender to accurately determine the needed liquidity for a successful routing of their payment is impaired.

Due to this uncertainty, Pickhardt found that the best answer is based on probability.

Pickhardt Payments quantifies the uncertainty around liquidity to a probability, mapping out all the possible paths for a given payment to take and selecting the one with the highest likelihood of succeeding. In other words, Pickhardt Payments seeks to select the path with the lowest level of uncertainty.

The probabilistic model used by Pickhardt estimates the amount of liquidity that there is in a channel. That model is run on the Lightning Network’s public payment channels to estimate how likely it is that a certain amount of liquidity exists in a given channel. The payment is then sent through the path that is more likely to contain the highest amount of liquidity — seeking to optimize for reliability. If the payment fails, the model learns from its mistake by updating its belief about the network.

Pickhardt’s approach applies decades-old computer science research to the burgeoning Lightning protocol. More specifically, the Lightning researcher draws from late father of information theory Claude Shannon’s work on communication channels, entropy and uncertainty to quantify communication uncertainty with probabilistic distributions.

Pickhardt Payments For Large Transactions
On Lightning, large payments are made more feasible by being broken down into smaller payments. These then get routed across the network to the destination and if they all are successful, then the original payment is successful.

Given that all divisions need to succeed in order for the original payment to succeed, the higher the number of payments an original payment is divided into, the lower the likelihood of success. This is because the probability of the original payment to succeed is found by multiplying the probabilities of each “child” payment succeeding. This creates a sort of a paradox because, in theory, the smaller the payment the higher the chance of success. Hence, an optimization challenge in finding the correct split emerges.

Pickhardt Payments seeks to increase the probability of the original payment succeeding by striving for this optimization, which is made by reducing the uncertainty costs. To achieve that, it leverages operations research (OR) .

More specifically, Pickhardt Payments uses Minimum-cost flows , a well-studied tool from the field of OR, to model and conduct the optimal multi-part Lightning payment — improving the decision-making process of splitting and delivering payments on Lightning. In short, the premise is that there is an inherent cost attached to the uncertainty about the liquidity information for every channel.

Not to be confused with fee costs, uncertainty costs can be thought of as the opportunity cost in trying a given path. In theory, the higher the uncertainty cost, the higher the opportunity cost as it’s less likely that the payment will succeed. Quantifying that uncertainty allows Pickhardt Payments to minimize the opportunity cost and choose the path that maximizes the chance of success.

Ultimately, these optimizations allow Pickhardt Payments to send large Lightning payments that were previously impossible on the network.

Pickhardt’s design differs from current practices on Lightning because, just like with single payments, prioritization for the splitted payments is usually done based on fees. On the other hand, Pickhardt Payments prioritizes lowering the uncertainty costs as it seeks to increase the likelihood of payment delivery, meaning that fees can often get relatively expensive if compared to those commonly paid on Lightning.

However, Pickhardt told Bitcoin Magazine that his algorithm could also offer the choice to optimize for fees, though he argues doing so is at present computationally heavy given the existence of Lightning’s base fee . In that case, the challenge would be to find an optimal balance between the two options — which he calls “features” — as users dabble in what they ultimately wish to prioritize for.

How To Use Pickhardt Payments Today
Usage of Pickhardt Payments today can be done via LND manageJ by Carsten Otto. Alternatively, Pickhardt is developing a library which currently allows for simulations and production tests. Pickhardt told Bitcoin Magazine that he will eventually ship the library with bindings for implementations, but that is not currently as high a priority as technical correctness, security and runtime. Even though there isn’t yet a simple way a regular user can take advantage of Pickhardt Payments, availability should increase as developers keep working on the algorithm and library to boast its robustness and security.

Thanks to Rene Pickhardt for information and feedback.

For more details about Pickhardt Payments, navigate to the related research paper and mailing list post . More resources are also available on Pickhardt’s website .