I'm creating a "Megathread" regarding the Lightning Network and have been fielding questions. To help obtain the correct answers with sources, I'm reaching out to the Bitcoin StackExchange.

I was asked to make a separate post for each question.

Thank you in advance for helping the community understand more about this great technology.

2 Answers 2


This is not so easy. Infact it seems almost impossible to be done in an elegant way. While the capacity of public channels is known to everyone on the network the balance of each channel is unknown.

As nodes sharing their balance is

  1. a privacy issue,
  2. technically in a peer-to-peer network difficult as the channel state / balance might change several times per second and gossip protocol propagation takes longer and
  3. Hard to proof validity of a published the channel Ballance

We usually don't know the balance.

Thus a Sender could just use try and error which is particularly inefficient in large networks as the number of paths grows quite quickly.

In practice node operators could use "manipulated onions" to probe nodes for a current minimal channel balance. Which obviously is also difficult as the balance might change quickly.

In precise people work on AMP routing which means doing several small payments (maybe even over several paths) instead of a large one or JIT routing which allows nodes along a path to rebalance their channels if they don't have enough balance to forward the onion. (disclaimer I proposed JIT routing and it is not clear yet if it becomes a lightning standard)

On a Side note :maybe you want to add my youtube channel with lightning educating to your mega thread (which in the past helped me a lot! Thanks!)


It's all done in the process of finding the best route between a payee and a seller. This post details that process pretty thoroughly

Relevant tidbit:

Altogether, "shortest" would be some combination of reachable, sufficient liquidity, lowest fee, fewest hops, and most reliable. As Hash Time Lock Contracts are nearly trustless (only potentially locking your money for some time), and operating a routing wallet should have low resource requirements, it seems likely that the payment routing market should achieve a healthy competition, therefore discouraging nodes to lock money by establishing channels just to earn fees from routing. Payment channels between nodes that have some form of regular business relationship seem more likely as there is an immediate benefit.

Context and explanation: The post describes the process that nodes in the network rank their connections by desirability in reference to a transaction. The node that is doing the calculations takes in many factors include reachability, sufficient liquidity, lowest fee, fewest hops, and reliability.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.