Intro
Rene's newest research on measuring the likelihood of payment possibility is up on his Github. He generously provided the code along with the results. He could explain the project much better than I could, but here's the TL;DR.
If you repeatedly perform the following experiment, you create a distribution of amounts that (in a zero-fee network) describe the probability that the network can relay a payment of X satoshis.
The Experiment:
- Create a graph from an LN snapshot.
- Sample balances for channels from a uniform distribution.
- Get the max flow between two random peers.
You need at least 256 samples to get a stable distribution. The more samples, the more better the resolution of uncertainty.
Feb 2024 Snapshot Results
I ran the code on a newer snapshot of the Lightning Network. Here are the results:
Maximal sendable amounts to guarantee service level objective
P
in the full network & professional subnetP | FULL LN | Professional subnet ------+-----------+-------------------- 99.9% | 0 | 842508 ------+-----------+-------------------- 99.0% | 0 | 3417123 ------+-----------+-------------------- 97.5% | 0 | 4828513 ------+-----------+-------------------- 90.0% | 169 | 8203365 ------+-----------+-------------------- 80.0% | 7565 | 11583791 ------+-----------+-------------------- 50.0% | 62731 | 26260636 ------+-----------+-------------------- 33.9% | 165426 | 40333621 ------+-----------+--------------------
Expected Service level
P
in the full network & professional subnet for various target amountsamount | FULL LN | Professional subnet ---------+------------+-------------------- 1000 | 88.06% | 99.99% ---------+------------+-------------------- 10000 | 77.62% | 99.99% ---------+------------+-------------------- 100000 | 40.85% | 99.98% ---------+------------+-------------------- 1000000 | 12.29% | 99.87% ---------+------------+--------------------
Full Network: =============================== Number of Nodes: 16555 Number of Edges: 58093.0 Total Capacity: 4955 BTC Average Liquidity per node: 29.0M sats Average node degree: 3.5 Density: 0.0004 Professional Network: =============================== Number of Nodes: 1009 Number of Edges: 17000.0 Total Capacity: 3309 BTC Average Liquidity per node: 328.0M sats Average node degree: 16.8 Density: 0.0334
Compared to his results for the 2022 snapshot, it looks like pronet can relay payments with 99.9% probability that are order of magnitudes higher than in 2022. In contrast, the full network cannot relay any payments with >97.5% probability. In fact, SLA's for most payment sizes decreased for the full net, except for the larger payments whose SLA's increased slightly.
Beta Distribution
I also tried sampling from a different kind of distribution for the channel balances. Instead of sampling from a uniform distribution which assigns an equal probability for all possible balances of a channel, I chose to use a beta distribution to describe the balances. Assume for each channel that 40% of the time, the funds are on the left node's side, 40% of the time the funds are on the right nodes side, and 20% of the time the balance is somewhere in between. This scenario can be described using a beta distribution.
Under this assumption, the amounts of that can be relayed at certain SLA levels are generally lower. The effect this assumption had on the results of the older snapshot (not included) were more profound. However, In the newer snapshots, the results for either assumption converge for the lower level SLA's and will most likely continue to do so as the network evolves.
Maximal sendable amounts to guarantee service level objective
P
in the full network & professional subnetP | FULL LN | Professional subnet ------+-----------+-------------------- 99.9% | 0 | 457670 ------+-----------+-------------------- 99.0% | 0 | 2755395 ------+-----------+-------------------- 97.5% | 0 | 4331736 ------+-----------+-------------------- 90.0% | 1 | 7842446 ------+-----------+-------------------- 80.0% | 2245 | 11383657 ------+-----------+-------------------- 50.0% | 50456 | 26212081 ------+-----------+-------------------- 33.9% | 137741 | 40392638 ------+-----------+--------------------
Expected Service level
P
in the full network & professional subnet for various target amountsamount | FULL LN | Professional subnet ---------+------------+-------------------- 1000 | 83.74% | 99.99% ---------+------------+-------------------- 10000 | 70.34% | 99.98% ---------+------------+-------------------- 100000 | 37.58% | 99.95% ---------+------------+-------------------- 1000000 | 11.12% | 99.81% ---------+------------+--------------------
Thanks Rene for sharing your code so that it can be experimented with.
Questions/Comments/Corrections welcome!
Uniform
P
in the full network & professional subnet for various target amountsBeta
P
in the full network & professional subnet for various target amountsNetwork Stats