2

I'm checking How does the Lightning network work in simple terms? answer example:

1) Putting funds into Lightning We both send 0.5 BTC into a shared 2-of-2 multisig address. This requires a transaction on the Bitcoin blockchain. As a "balance sheet", we each create a 2-of-2 multisig transaction that pays out 0.5 BTC to you and 0.5 BTC to me. I sign one payout transaction and give it to you. If you want to put it in effect, you need only add your own signature and broadcast it to the Bitcoin network. Vice versa, you give me your copy of the payout transaction that you have signed and I have not yet. The "balance sheet" is a regular 2-of-2 multisig transaction in the Bitcoin network, it just isn't valid yet, because it doesn't have all signatures.

So in the first step you make a regular transaction from your address A to our common 2-2 address C, and I make a regular transaction from my address B to our common 2-2 address C?

I have one key of this 2-2 multisig address C and you have another?

Address C now has 1BTC.

Now from this address C I return 0.5 of its 1 BTC to your address A and sign with my key, and you return remaining 0.5 to my address B and sign with your key?

2

So in the first step you make a regular transaction from your address A to our common 2-2 address C, and I make a regular transaction from my address B to our common 2-2 address C?

Yes, although in the current lightning spec and implementation, only one party funds the channel. However it could certainly be both parties that fund it.

I have one key of this 2-2 multisig address C and you have another?

Yes.

Address C now has 1BTC.

Now from this address C I return 0.5 of its 1 BTC to your address A and sign with my key, and you return remaining 0.5 to my address B and sign with your key?

Two transactions are formed at this point:

  • one that you make and sign and send to me that gives 0.5 BTC to you and 0.5 BTC to me,

  • one that I make and sign and send to you that also gives 0.5 BTC to you and 0.5 BTC to me.

  • Regarding third part. I know that both must sign to be valid. I'm interested if in the second step we use the address C (we put funds in step one) to return funds? – croraf Nov 15 '17 at 15:43
  • Yes, address C is the one that is spent from to return funds. – Andrew Chow Nov 15 '17 at 15:55
  • Also in the third part, the transaction I make from 2-2 address has two outputs (0.5 to me and 0.5 to you), or just one output that sends 0.5BTC to you? – croraf Nov 15 '17 at 16:01
  • 1
    It is two outputs – Andrew Chow Nov 15 '17 at 16:34
  • And the transaction you make from 2-2 address has also two outputs 0.5 to me and 0.5 to you? Thus only one of these transactions can be fullfiled, as each spends entire funds from address C? – croraf Nov 15 '17 at 19:36

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.