9

I looked into docs but didn't find any information, how do client get information about the state of intermediate channels? Since channel transactions are offchain, and only channel participants knows current channel state (each peer balance) how can the sender be sure that all channels on the route have sufficient credit to forward the payment?

Thank you in advance.

Murch
  • 75,206
  • 34
  • 186
  • 622
alex
  • 373
  • 1
  • 5
  • I think you are really asking about how routing works in the Lightning Network, in which case this may be a duplicate of http://bitcoin.stackexchange.com/questions/43687/how-are-paths-found-in-lightning-network – Jestin Jun 27 '16 at 13:52

1 Answers1

1

Let's say Alice wants to send a payment of 0.01 BTC to Dave and checks the following route through Bob and Carol, i.e.:

Alice ––– Bob –0.005–––0.02– Carol ––– Dave

Bob and Carol have a payment channel with a balance of 0.025 of which 0.005 are Bob's. If Bob now claims to be able to forward Alice's payment, this will only slow down Alice, but he would never be able to trick her. As the payment contract is crafted in cooperation of all four users along the route, Carol would also have to sign it. Since Carol shares the channel with Bob, she knows that Bob cannot sign over sufficient bitcoins to her to cover the payment, and would not agree to the payment.

Therefore, no one would have anything to gain by overstating their balance (except perhaps obstruction of payments), because their channel partner is also part of the contract and would deny a payment that exceeded the available balance.

Murch
  • 75,206
  • 34
  • 186
  • 622