Author: ZmnSCPxj 2017-07-08 01:13:01
Published on: 2017-07-08T01:13:01+00:00
The proposed Bitcoin Improvement Protocol (BIP) aims to provide a standard address format for timelocked funds using the OP_CHECKLOCKTIMEVERIFY opcode. This will allow users to precommit themselves to not spend funds until a particular date and easily make use of this opcode. The proposal specifies formats for specifying an address that locks funds until a specified date and a redemption code that allows the funds to be swept on or after the specified date.The timelocked address format includes the four characters "hodl", a date in YYYYMMDD form, and a network code. The data part of the address consists of a version quintet and a public key hash. The given date is the first day that the funds in the given address may be redeemed, and the funds are owned by whoever controls the private key corresponding to the public key hash given. The redemption code format includes the four characters "hedl", a date in YYYYMMDD form, and a network code. The data part of the address consists of a version quintet and a private key. The given date is the first day that the funds in the given address may be redeemed, and the private key unlocks the funds.Lock time computation is done by taking the day before the lock date and taking the time 1000h (10:00 AM) of the date from the above step. This lock time is then translated to a Unix epoch time, as per POSIX.1-2001. An ordinary P2SH payment is used to provide funds to a timelocked address, with a script consisting of OP_CHECKLOCKTIMEVERIFY and OP_DROP followed by OP_DUP, OP_HASH160, OP_EQUALVERIFY, and OP_CHECKSIG.To sweep a timelocked redemption code after the timelock, one must provide the given redeemScript as part of the scriptSig. Wallet software supporting this BIP must be capable of sweeping the redemption code on or after the specified date, support sending funds to the timelocked address specified here, and may provide a command to create a pair of timelocked address and redemption code. Wallet software should reuse the same interface for paying to timelocked addresses as paying into other Bitcoin addresses.The proposal recommends that wallets supporting a sweep function should reuse the same interface for sweeping individual private keys, which allows for easy implementation and use of timelocked funds. The proposal also outlines several expected use cases for this feature, including users who want to wait before cashing out, users who want to gift Bitcoin to minors, users who want to provide monthly subsidies or allowances, and users who fear duress or ransom in the future.The proposal provides a detailed procedure for sweeping a timelocked redemption code, including steps such as extracting the private key, deriving the public key hash, and finding unspent outputs that pay to the redeemScript hash. The proposal also includes a rationale for having a single standard for timelocked funds that is shared among multiple Bitcoin wallet implementations, as it provides assurance that the redemption code will still be usable after long time horizons.The proposal provides a timelock at the granularity of a day, with the actual timeout used being 1000h of the day before the human-readable date. The human-readable date is formatted according to ISO standard dates, with dashes removed. The proposal also includes details on the public address format using 'hodl' as the start of the code, while the private key uses 'hedl'.
Updated on: 2023-05-20T03:16:02.205356+00:00