Let's say Alice opens a micropayment channel with Bob and sends $10 into the multi sig transaction.
How do we know that Alice has those $10? Or are we taking the risk of her double spending it?
Bitcoin Stack Exchange is a question and answer site for Bitcoin users, developers, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityLet's say Alice opens a micropayment channel with Bob and sends $10 into the multi sig transaction.
How do we know that Alice has those $10? Or are we taking the risk of her double spending it?
In the process of opening a micropayment channel, the two parties put funds into a lock-box of sorts that requires both parties to sign off any any withdrawals from that lockbox. In the blockchain, this is essentially putting some funds into a 2-of-2 multisig output, where the 2 keys are Alice and Bob's keys. If only Bob is going to be transferring money to Alice or vice versa (unidirectional), then only one person need put funds into the 2-of-2 lock box.
Then, when it comes time for Bob to pay Alice, Bob gives Alice a transaction that spends the contents of the lock box, giving Alice some amount of the lock box funds and using a change output that puts the change back into the lockbox. Since withdrawing from the lock box requires both Alice and Bob to sign off, Alice can confirm when Bob has signed off to give her funds.
Notice that it has to be this way, requiring both Alice and Bob to transfer funds through the channel, because if it just required the sender of the funds, you run into the exact problem you mentioned: the sender could be trying to double spend those funds and you wouldn't know.