Lightning Network: how do we find the path between the sending and the receiving nodes?


#1

As far as I understood the lightning network is a web of connected nodes that keep balances between them and when Alice wants to send btc to Dave she can update her balance with Bob (-1btc, for example) which will update his balance with Carol (-1btc as well, getting even), who will finally update her balance with Dave. If Dave closed all his channels now he would receive 1 btc more than he would had received before the transactions, while Alice would receive 1 btc less and Bob and Carol would not have their totals changed.

My question is: how do we find this route Alice-Bob-Carol-Dave? When Alice meets Dave they dont know what is the best path between their nodes, or even if there is one.