Also covering OP_CHECKOUTPUTSHASHVERIFY
OP_CHECKTEMPLATEVERIFY (CTV) is a proposed new opcode that takes a commitment hash as a parameter and requires any transaction executing the opcode include a set of outputs that match the commitment. This makes it possible to create an address that specifies how any funds received to that address may be spent—a design known in Bitcoin as a covenant.
Originally introduced under the name OP_CHECKOUTPUTSHASHVERIFY (COSHV), the proposal initially focused on the ability to create congestion control transactions where a spender pays a single address using CTV which, when confirmed to a suitable depth, then assures several receivers that they can each be paid. This two-step process can probably be used anywhere payment batching is an option but it can likely reduce fees even further than payment batching.
Later versions of the proposal placed greater emphasis on other contracts and covenants that could be created using the new opcode, such as the ability to create channel factories, vaults, and coinjoin transactions in new ways that might simplify construction or reduce fees. Other authors have mentioned that the new opcode could possibly be used to allow users to trustlessly pool their funds together into a single UTXO in a way that would increase privacy.
Primary code and documentation
Optech newsletter and website mentions
- 2020-02-19 Vault prototype with sample implementation using OP_CHECKTEMPLATEVERIFY
- 2020-02-12 OP_CHECKTEMPLATEVERIFY workshop summary
- 2020-01-29 BIPs #875 assigns BIP119 to the OP_CHECKTEMPLATEVERIFY proposal
- 2019-12-28 2019 year-in-review: OP_CHECKTEMPLATEVERIFY
- 2019-12-04 OP_CHECKTEMPLATEVERIFY (CTV) replaces COSHV proposal; concerns restated
- 2019-06-12 Potential script changes, including new COSHV opcode
- 2019-06-05 COSHV proposal replaced
- 2019-05-29 Detailed summary: proposed transaction output commitments
- 2019-05-29 Proposed new opcode for transaction output commitments