Soliciting more discussion for OP_CONSTRAINDESTINATION (a covenant opcode)



Summary:

The author proposes an opcode, OP_CONSTRAINDESTINATION, as a potentially useful addition to the discussion of covenants and alternative covenant proposals. The proposed opcode is fully enumerated and enables infinitely recursive covenants, but does not prevent malleability on its own. It offers more flexibility than OP_CTV in the creation of wallet vaults and allows for spends from a wallet vault that can spend arbitrary amounts and send the rest back to a change address, among other benefits.However, there are some downsides compared to OP_CTV, including increased implementation complexity and complexity of the possibility space. The opcode's main purpose of ensuring that only certain addresses are sent to might be simpler than CTV, but the aspect of counting output values pushes it into more complex territory.The opcode requires some mechanism for fee limiting, and the proposed solution is to add an additional opcode called OP_LIMITFEECONTRIBUTION. The author also discusses the potential use of sponsor transactions alongside the opcode to pay fees.The combination of OP_CONSTRAINDESTINATION and OP_PUSHOUTPUTSTACK allows the creation of even better wallet vaults, but substantially increases complexity due to being able to push dynamic state onto transactions, which substantially increases the possibility space of covenant chains.Overall, the author believes that wallet vaults are a very important mechanism to enable much more secure self-custody setups without sacrificing so much usability as normal multisig wallets require. They believe that making it easier for people to securely self-custody their bitcoins is an incredibly important area of development, and even if some other covenant opcode makes CTV completely obsolete, a 4-6 year head start on better self-custody mechanisms could go a long way to saving a lot of people who need bitcoin a lot of pain.


Updated on: 2023-05-22T20:01:43.571123+00:00