[BIP draft] CHECKLOCKTIMEVERIFY - Prevent a txout from being spent until an expiration time



Summary:

Peter Todd has proposed a new opcode named CHECKLOCKTIMEVERIFY for the Bitcoin scripting system that enables transactions to be unspendable until a certain point in time. This opcode redefines the existing NOP2 opcode and compares the top item on the stack to the nLockTime field of the transaction. The nLockTime field in a transaction prevents it from being mined until a certain block height or block time has been reached. By comparing the argument to CHECKLOCKTIMEVERIFY against the nLockTime field, the desired block height or block time can be indirectly verified. This makes it possible to prove that a transaction output can be spent in the future. Todd provides several examples where this technique can be used, such as escrow, non-interactive time-locked refunds, two-factor wallets, micropayment channels, trustless payments for publishing data, and proving sacrifice to miners' fees. In the case of escrow, funds can be stored in scriptPubKeys with CHECKLOCKTIMEVERIFY so that after three months have passed, they can be spent with a specific scriptSig. Similarly, two-factor wallets can use CHECKLOCKTIMEVERIFY to create refund signatures on demand, thus avoiding the need for co-operation from the service. Micropayment channels and trustless payments for publishing data can also benefit from this technique. Finally, Todd notes that if the SignatureHash() algorithm could optionally cover part of the scriptSig, the per-signature capability could replace the per-transaction nLockTime field entirely.


Updated on: 2023-06-09T02:50:17.024283+00:00