From rusty at rustcorp.com.au Mon Jan 18 00:00:30 2016 From: rusty at rustcorp.com.au (Rusty Russell) Date: Mon, 18 Jan 2016 10:30:30 +1030 Subject: [Lightning-dev] 2-of-3 Instant Escrow, or How to Do "2-of-3 Multisig Contract" Equivalent on Lightning In-Reply-To: <20160117014533.GA26503@lightning.network> References: <20160117014533.GA26503@lightning.network> Message-ID: <87k2n721up.fsf@rustcorp.com.au> Joseph Poon writes: > TL;DR: It's possible to do 2-of-3 party escrow in Lightning, > functionally the same as the use case for on-chain "2-of-3 multisig" > escrow systems (without the 3rd party escrow being a custodian for any > funds! Or anyone else holding custodial ownership of coins for the > matter). As Lightning uses Bitcoin transactions and scripts (using > Bitcoins, not 3rdPartyCoins), it'll be possible to do nearly *instant* > *offchain* multisig "escrow" on decentralized Lightning! This is useful > for payments for goods and services which needs a 3rd party mediator. Hi Joseph, This is a very nice variant! As you say, it's not complex either (it works just as well with privkey-instead-of-preimage variants, too, though I suspect that case can be compacted more than the naive "just duplicate the whole script"). >From an inter-node transport perspective, all you really care about is how many values per contract, AFAICT. It's up to the sender and receiver to agree on an escrow agent, figure out how to communicate to them, etc. > P.S. Tadge, Laolu, and I have also put up a repo of our in-progress > design/code for Lightning here: https://github.com/LightningNetwork/lnd Congratulations! I'm going to wade through this week and try to create a list of wire protocol differences so we get closer to a final version. Nice work! Rusty.