Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: unabridged on April 19, 2012, 05:54:55 PM



Title: Timelocked Multisig
Post by: unabridged on April 19, 2012, 05:54:55 PM
Can nTimeLock and multisig be used to create a 2 of 3 transaction where one of the sigs can't be used before block N?

This could be used to create a wallet payment service: 1 key held by wallet service, 1 key held by user, 1 key that can be used in 1000 blocks printed out and held by user for insurance in case wallet service disappears
But before this time is up the wallet payment service can be sure this account cannot be double spent, so its can be used to pay instantly for things like ATM withdrawal based on the reputation of the wallet payment service.


Title: Re: Timelocked Multisig
Post by: blueadept on April 19, 2012, 06:08:06 PM
You can do it in several steps.

1. Generate a transaction to a 2 of 2 address with one key from you and the other from the wallet service.
2. Get the hash of the transaction and have the wallet service cosign a timelocked transaction back to you.
3. Broadcast the transaction from 1. Now you have your money in a 2 of 2 address but if it's not spent before it's unlocked, you can get it back.

This will work on the current network assuming the transaction in 2 isn't finalized. The wallet service shouldn't accept more than one version of the transaction and should broadcast it immediately to prevent the timelocked transaction from being broadcast and sitting in the memory pool blocking the legitimate spend attempt.