Let's imagine Alice wants to send multiple transactions to Bob. Both Alice and Bob have open channels with Carol, not with each other:

Alice <-> Carol <-> Bob

So Alice first sends 0.01 BTC to Bob. She sets up the multi-sig tx and sends it off to Carol, which then also Bob sees. Then Alice makes another transaction to Bob of 0.02 BTC, and sets an earlier time-lock in order to invalidate the earlier 0.01 tx.

Now both Alice and Bob have seen these 2 transactions and they both go offline. They are sure that Alice has given Bob 0.02 BTC.

My question is: how do they know that Carol will commit to the blockchain (when the moment comes) the second transaction rather than the first? Couldn't Carol simply send the 0.01 tx to the blockchain rather than the 0.02 one?

I understand that Bob could come online and post it himself, and because of the timelock, he could do it before the other one, thus invalidating it.

But in the scenario where both Alice and Bob are offline do they have to trust Carol to behave honestly?


AFAIU, if you have open lightning channels, you cannot go offline. You must be online in order to monitor the blockchain for old commitments. If you see an old commitment transaction, you immediately broadcast the punishment transaction, but you cannot do this if you go offline. So if you have open lightning channels, you must be online and if you go offline, you are trusting that the other person in the channel will not attempt to defraud you.

  • Interesting, so both Alice and Bob need to be online for the entire channel duration? This seems quite unfriendly for users of wallets on mobile for instance where connections are quite sporadic. – Luca Matteis Jul 5 '17 at 8:45
  • I think there might me more to this. Carol can commit the 0.01 tx instead of the 0.02 to the blockchain (while you're offline). However, then you come online, say after a week, and present the 0.02 one which has an earlier timelock. The network would see that and penalize Carol for commiting the 0.01 one instead of the 0.02 one? I was reading about something that has to do with penalties but am not sure if this is the logic behind it and how it would work. – Luca Matteis Jul 5 '17 at 15:58
  • In order for you to know that the penalty transaction should be broadcast, you need to be online and monitoring the blockchain. Alternatively you can have some third party watch it for you. But there's no way around the fact that someone needs to watch the blockchain in order to know whether to broadcast the penalty transaction or not. – Andrew Chow Jul 5 '17 at 16:37
  • But how can you trust that the third-party will do it correctly and in a timely manner as to not let the other, old, transaction win? – Luca Matteis Jul 5 '17 at 16:57
  • That's why you must trust them. Otherwise you can't. – Andrew Chow Jul 5 '17 at 16:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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