Bitcoin covenants are a suggested modification to Bitcoin’s consensus rules that would enable a script to forbid an accredited spender from spending to certain other scripts. Covenants can be thought of as building blocks that add functionality to the Bitcoin script language and enable transactions to limit the scripts of successive transactions.
When you make a normal Bitcoin transaction, your Bitcoin is encrypted with a locking script, the conditions of which have to be met before the Bitcoin can be spent. Examples of locking conditions include the absence of expenditure without a signature to show that you have the private key that corresponds to the given public key or timelocks, which are somewhat similar to covenants and entail that coins cannot be spent before reaching a given number of blocks.
How Do Bitcoin Covenants Work?
Bitcoin covenants are described as “a way of specifying rules for how the control over coins will be transferred at some point in the future” and entails a set of conditions on a specific unspent transaction output (UTXO) that outlines how the transaction’s relevant coins can be spent.
For example, one Web3 wallet can put a condition on a Bitcoin it has by restricting it to a certain number of associated addresses. When this wallet broadcasts a Bitcoin transaction to another wallet, in turn, this wallet can only send the same Bitcoin to addresses included on that whitelist.
To illustrate how covenants operate, let us look at a basic example. Assume that Alice wishes to send 1 BTC to Bob but wants to set a condition that the received funds must only be used for a certain product from Bob’s e-shop. Thus, Alice is able to create a covenant that will include this condition.
Here’s how the process would work:
- Alice initiates a transaction to send 1 BTC to Bob but she forms a covenant that the received BTC must be used on a particular item on Bob’s store.
- Bob gets one BTC as a payment, but he is allowed to spend the money only when he proves that the received BTC was spent on the given product.
- Bob offers the required proof, and the covenant is fulfilled.
- Bob can now use the 1 BTC as he wants to.
Advantages of Bitcoin Covenants
The aspect of security has remained one of the most important areas where improvements are being sought by the developers, and covenants could be a great assistance in this. Covenants are handy when it comes to security, particularly against some form of the $5 wrench assault. Preventing people from stealing your Bitcoin property is a good example of how to use it since it becomes more difficult for people to do so.
Covenants can also deal with the problem of secure key management, and the use of vaults can help with one of the biggest issues of cryptocurrency security. Vaults help to improve overall user security as they discourage the stealing of coins.
The user utilizes a method that does not allow an attacker to fully control the funds even if they can obtain the private keys that secure the said funds. This mechanism entails pre-signed transactions with some keys being removed to set a time delay on the funds.
Drawbacks of Bitcoin Covenants
Some Bitcoin experts, such as Adam Back, Jimmy Song, and Andreas Antonopoulos, have expressed concern about the enforcement of covenants, especially with the BIP119.
Antonopoulos has expressed his worries over the so-called “recursive covenants” that the new update might bring, which in essence is negative for the network.
A recursive covenant happens when a programmer sets a condition to a transaction and then sets another condition to another transaction that follows it and it continues on to create a chain of future limitless recursive covenants.
Blacklisting and Risks of Censorship and Confiscation
On the positive side, locking up where Bitcoin can be spent enhances the security element, but on the flip side, it opens the door to censorship and government interference that may pose a threat to Bitcoin.
The authorities could ban exchanges from unwinding only those covenants that had some level of control over the coin.
This is the same risk that currently exists as governments can demand that exchanges only send to addresses that have a taproot spend path or are multi-sig controlled by the government, covenants would just make it easier for such governments to enforce on-chain KYC.
Fungibility Threats
Covenants could compromise Bitcoin’s fungibility — the capability of every Bitcoin to be the same in terms of functionality and value. Even though covenants are useful for security and scalability, they would alter the characteristics of certain Bitcoin units and thus create different forms of digital currency with different spending capabilities or destinations.
Thus, the opponents of the change state that restricting the ways of using Bitcoin would restrict it as a digital currency, which would have a negative impact on its value.
Do Covenants Improve Bitcoin?
In essence, Bitcoin covenants will work very effectively for security and reliability in the Bitcoin system. Despite that, their effects on the general Bitcoin system will be evaluated before their widespread use. However, like all tools, they have their advantages and disadvantages that should be taken into consideration before their adoption.
When properly implemented, covenants are beneficial for the security and functionality of Bitcoin, thus opening up possibilities for further evolution of financial operations in the network. However, developers need to design and test these mechanisms in a proper way so that they do not create new vulnerabilities or hinder the functionality of Bitcoin.