Post
Topic
Board Development & Technical Discussion
Re: Mastering the Lightning Network book
by
darkv0rt3x
on 13/01/2023, 15:38:20 UTC
Specifically this part:
Quote
Any funds you received after this will have been stolen by your partner.

If we are not able to detect te cheater peer, we only get the funds that were allocated by the commitment transaction broadcast by the cheating peer, right? So, if this is correct, what are this "any funds I received after this will have been stolen by your partner"??

Here's an example: you are A and your channel partner is B.

Code:
[0] B opens 1BTC channel towards A
State 0: A [0] --- B [1]

[1] B sends A 0.1BTC
State 1: A [0.1] --- B[0.9]

[2] B sends A 0.2BTC
State 2: A [0.3] --- B[0.7]

If B now broadcasts channel state 1, you will lose any funds received after this, i.e. the 0.2BTC payment. In the meantime you may already have shipped some goods or provided a service, so those 0.2BTC are considered to have been 'stolen' from you.



Again, there's a period of time after B broadcasts such a state (closes the channel unilaterally), during which you can come back online and provide a newer state (state 2). This will not only give you your full balance of 0.3BTC, but actually punish B for trying to publish an old state.



So, what any other funds there are to be received by node B other than the 60%??? This is the part I'm not understanding!
I believe you actually understood the concept but the wording confused you. I hope the step-by-step scenario I described above helps clear it up. 'Any funds you received after this' refers to the funds bringing your channel balance (in your example) from 60% to 70%. Since you received those funds after signing the 60/40 channel state.

Ah ok, I see it now. Thanks for the step-by-step guide. It was helpful.
I will finish Chapter 3 probably tomorrow!