An Exposition of Pathfinding Strategies Within Lightning Network Clients

Sindura Saraswathi, Christian Kümmerle

Introduction: The Source Routing Challenge

The Lightning Network (LN) serves as Bitcoin’s primary layer-2 scaling solution, facilitating near-instant, low-fee payments through off-chain channels. A fundamental architectural choice of the LN is "source routing," where the sender is responsible for determining the complete path to the recipient.

This task is complicated by information asymmetry: while channel capacities are public, the internal distribution of liquidity is private. A sender may select a path that appears viable based on capacity, only to encounter failure if an intermediary node lacks sufficient local balance. Consequently, pathfinding becomes a multi-objective optimization problem, balancing reliability (success probability), cost (routing fees), and security (minimizing timelocks).

Algorithmic Complexity: The NP-Complete Trap

A common misconception is that LN routing is a straightforward shortest-path problem solvable by standard algorithms like Dijkstra’s. However, as clients introduce "side constraints" to protect user interests—such as limiting total fees or ensuring a minimum success probability—the problem transforms into a constrained shortest-path problem.

Table 1: Pathfinding constraints and their implementation across major Lightning Network clients.

As shown in Table 1, major clients like LND, LDK, and Eclair implement various constraints. Mathematically, these constraints often render the pathfinding problem NP-complete. In practice, this means that production clients rely on "greedy heuristics" rather than optimal solvers. For instance, LND uses a modified Dijkstra’s algorithm to handle both additive (fees) and multiplicative (success probability) costs. The authors demonstrate that this approach is not guaranteed to find the optimal path, as the greedy nature of the algorithm may bypass superior routes in favor of local optima.

Simulation Methodology: Modeling Liquidity

To evaluate the effectiveness of different client strategies, the study utilized a 2022 snapshot of the Lightning Network (13,129 nodes and 57,773 channels). Since actual liquidity is private, the authors employed two distinct simulation models:

  • Uniform Distribution: Funds are assumed to be distributed randomly across channels.
  • Bimodal Distribution: A more realistic model where funds tend to accumulate at either end of a channel due to asymmetric payment flows.

The researchers executed 10,000 simulated transactions across these models to benchmark the performance of LND, Core Lightning (CLN), Lightning Development Kit (LDK), and Eclair.

Comparative Performance: Reliability vs. Efficiency

The simulations revealed significant trade-offs between implementations:

  • Eclair: The "Eclair3" variant, which utilizes log-success probability, emerged as a robust all-rounder, balancing high reliability with competitive fees.
  • Core Lightning (CLN): CLN proved superior in terms of latency, consistently identifying paths with the lowest timelocks, which reduces the duration funds are locked in the event of a stalled payment.
  • LND: While LND's core logic is sound, its performance is highly sensitive to liquidity assumptions. A proposed variant (LND-un) using uniform liquidity assumptions showed the highest success rates in uniform environments.
  • LDK: LDK exhibited higher fee ratios for smaller payments but became one of the most cost-effective options for larger transaction volumes.

Conclusion and Future Directions

The study highlights that current LN pathfinding is largely driven by heuristics that struggle with the NP-complete nature of constrained routing. Furthermore, the categorization of nodes into connectivity tiers reveals a "reliability tax" for poorly connected nodes, who face higher fees and lower success rates.

A limitation of this research is its "stateless" nature; real-world clients learn from past failures to avoid low-liquidity channels. Future research should incorporate this historical learning and expand the analysis to Multi-Part Payments (MPP), where payments are split across multiple paths. Moving toward more sophisticated algorithms that can better navigate the constraints of the network remains a critical frontier for Lightning Network development.

Summary updated

BibTeX
@inproceedings{saraswathi2025exposition,
  author = {Sindura Saraswathi and Christian Kümmerle},
  title = {{An Exposition of Pathfinding Strategies Within Lightning Network Clients}},
  booktitle = {ICBC},
  year = {2025},
  doi = {10.1109/icbc64466.2025.11114515},
}
Figure