I have a doubt about HTLC on a lightning network payment. I have this scenario:

Alice wants to pay 100 sats to David using a route she found with Bob and Chad, this would be:

Alice -> Bob -> Chad -> David

Alices sends the HTLC to Bob, Bob to Chad and Chad to David, everything goes as expected, David wants to reveal the secret to Chad and they update their channel state, now David have +100 sats on his channel balance and Chad have -100 sats.

Chad do the same with Bob and now Chad have +100 sats on his side of the channel and Bob have -100 sats on his side.

At the moment Bob wants to do the same with Alice his node crash and go offline (for days), Alice can wait for the timeout and get her funds back, Bob would lose the funds.

I read before that an HTLC chain was atomic, all payments are successful or none of them, is this true? in this case David and Chad got their payments updating the channel state but not Alice so this case is not atomic.

What I am missing here?

1 Answer 1


It is atomic

If a node goes offline the htlc will not be settled off chain but onchain. of course that is more expensive with respect to fees but that is true for channel closes in any case

  • What happens with the channel update between Chad and David? How they know if Bob or other hop goes offline? Why they would want to go onchain if they can update they channel state offline?
    – Grunch
    Commented May 28, 2021 at 18:39
  • Chad and david have settled off chain. Alice can't settle onchain as she did not get the payment secret as bob is offline. Bob looses money but he is offline he has to actively claim the payment. Slice cancled the htlc onchain as the timeout starts to kick in and not resolving the htlc might make her pay Bob later Commented May 29, 2021 at 19:39
  • "Chad and david have settled off chain. Alice can't settle onchain" <== not atomic, correct?
    – Grunch
    Commented May 29, 2021 at 20:58
  • Yes and no. It is atomic in the sense that a routine node cannot mess up. And make Alice or David loose funds. If the routing node disappeared it might have lost money though as David got Paid but Alice had not to reimburse Bob and cancles the htlc. If Alice goes onchain but Bob appears in time Bob can get reimbursed on chain too. Commented May 30, 2021 at 21:03

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.