Hi,
I just want to know if my understanding of payment channels is correct. I also have some questions that I highlighted in bold. Would be grateful if somebody could answer them.
So based on this:
https://bitcoin.org/en/developer-guide#micropayment-channel.
Scenario: Alice is going to do work and get paid in a micro-channel by Bob.
-----------------------
- Bob creates and signs a multisig 2-of-2 transaction for 100 mBTC bond, this has no lock time.
-Bob creates and signs a 2-of-2 refund transaction that uses outputs from bond, with time delay, for 100mBTC.
-Bob Gives refund transaction to Alice.
-Alice checks refund has time delay .
-Alice signs refund.
-Bob broadcasts refund
(correct??)-Bob gives bond transaction to Alice.
-Alice signs bond and broadcasts it on network.
Does Alice need to wait for at least one confirmation here to prevent Bob double spending bond through eg. transaction malleability or reversing block(s)?-Alice checks refund uses outputs of bond.
?? what prevents this bond being spent by Alice invalidating refund?-Alice does some work.
Alice creates 2-of-2 refund for 99 mBTC and gets bob to sign it. She does not sign it.The refund has no time lock and will invalidate the original refund if broadcast before its time lock.
-Alice does more work
.
.
.
-Alice finishes 30 units of work total.
-She signs refund for 70 mBTC and gives Bob to sign.
-Alice or Bob broadcast latest refund.
-This has to occur before the time delay of the original refund is reached.
- the end