Post
Topic
Board Development & Technical Discussion
Re: Why LN needs SegWit?
by
TierNolan
on 09/12/2016, 23:35:28 UTC
1) How large deposit outputs (0 and 3) must really be? I think 3x is an overkill, even 1x is enough?

They need to be large enough so that the abort for step 1 works.

If a party disappears, then the other party gets both deposits as refund.  This means that (slightly more than) 1x would be sufficient.

Quote
2) If the channel is funded asymmetrically, for instance if Alice unilaterally funds it (initial state: Alice: x, Bob: 0), how does it affect everything? Outputs 0 and 2 aren't needed at all?

I don't think it would work well with asymmetric setup.

If Alice is paying to a 2 of 2 output, then Bob has to pay the deposit to guarantee that he will cover any mutations.

For asymmetric funding, the initial transaction would be.

Code:
TX1:
0) Pays 1.1*y: (Alice + HA1 after 1 week) or (Bob after 2 weeks) or (2 of 2 Alice + Bob)
1) Pays x: (HB1 + Alice) or (2 of 2 Alice + Bob)
2) Pays y: (HA1 + Bob) or (2 of 2 Alice + Bob)
3) Pays 1.1*x: (Bob + HB1 after 1 week) or (Alice after 2 weeks) or (2 of 2 Alice + Bob)
4) Pays Alice's change: (Alice)
5) Pays Bob's change: (Bob)

That gives each party 1.1*(x + y) if the other party disappears after step 1.

For a unilateral channel, Bob still needs to provide a deposit during the setup, but gets it back once the channel is setup.

Code:
TX1:
0) Pays x: (HB1 + Alice) or (2 of 2 Alice + Bob)
1) Pays 1.1*x: (Bob + HB1 after 1 week) or (Alice after 2 weeks) or (2 of 2 Alice + Bob)
2) Pays Alice's change: (Alice)
3) Pays Bob's change: (Bob)

Bob pays 1.1x and Alice pays x.

If Bob disappears, Alice can claim output 1 after 2 weeks and get 1.1x back.

If Alice disappears, Bob can claim output 1 after 1 week and get his 1.1x back.  Alice can reclaim output 0 at any point after that and get her x back.

If it works out, Bob's money is tied up for 1 week.

The times could be made shorter (1-2 hours), since they are only for initial setup.