Covenant opcode proposal OP_CONSTRAINDESTINATION (an alternative to OP_CTV)



Summary:

A proposal was made to implement a way to limit the maximum amount to be sent from an address in wallet vaults. The suggested limit would be the maximum of s (number of satoshi) and p (percentage of the total available amount). A minimum value may be imposed on the percentage to ensure that the address can be emptied within a reasonable number of transactions. This kind of restriction would be effective in thwarting theft where all funds are swept in a single transaction. The proposal mentions several use cases, most of which overlap with op_ctv. One use case is a wallet vault where the user only needs to use one key to spend funds, but the attacker must steal two or more keys to spend funds. This provides better redundancy and security than a normal 2-of-2 multisig wallet. With a covenant opcode like this, it's possible to create highly secure wallets that allow normal people to hold self-custody of their keys without fear of loss or theft.James MacWhyte questioned the need for such an opcode and suggested that an attacker who compromises the key for user A can't steal the money because it can only be sent to user B. Billy Tetrud responded by explaining the benefits of a 2 key wallet vault over a normal 2-of-2 multisig wallet, including the ability for the user to recover their funds even if they lose one key and the second key can remain in a much more secure location. He also provided a link to a wallet vault design that uses OP_CD and his full vision of the wallet vault he wants to be able to create.


Updated on: 2023-06-15T00:23:52.934065+00:00