Covenant opcode proposal OP_CONSTRAINDESTINATION (an alternative to OP_CTV)



Summary:

In a recent conversation on the bitcoin-dev mailing list, Zac Greenwood asked about plans to implement a way to limit the maximum amount that can be sent from an address. Billy Tetrud responded by explaining that there is currently no proposal for limiting the amount that can be sent from an address, but rather there could be limits on the amount that can be sent in a period of time. Tetrud noted that implementing such limits would be difficult in the output-based system used by Bitcoin, but it would be easier in an account-based system like Ethereum. He suggested designing a system where coins are combined in a single output and encumbered with a script that allows a limited amount of coin to be sent to a destination address while requiring all other bitcoins to be returned to the sender in a new change output that is also timelocked. Regarding the proposal's effectiveness in thwarting the most damaging type of theft, Tetrud explained that a normal wallet vault already has this property, meaning that adding a spending limit would not add meaningful security to a delayed-send wallet vault. However, it could increase the security of a wallet vault that can be instantly spent from, where the attacker successfully steals funds, giving the victim time to gather their additional keys and move the remaining (unstolen) funds into a new wallet.Tetrud stated that OP_CD could potentially be augmented to allow specifying limit amounts for each destination, which would create a wallet with spending limits, but it would be awkward to use since 3rd parties cannot send money in, and privacy cannot be maintained. An alternate way of doing this without the need for new opcodes would be to have a third-party service sign multisig transactions from a wallet only up to a limit. The end-user could have additional keys so that the third-party cannot prevent them from accessing that if they turn uncooperative.Overall, Tetrud discussed how covenant opcodes like OP_CD could be used to create highly secure wallets that allow normal people to hold self-custody of their keys without fear of loss or theft and without the hassle of a lot of safe deposit boxes (or other secure seed storage locations). He also provided links to examples of wallet vault designs that utilize OP_CD.


Updated on: 2023-06-15T00:22:33.949301+00:00