Home › Glossary › Covenant

Covenant

Also called: covenants, Bitcoin covenants, spending restrictions, transaction introspection, CTV.

A covenant is a script rule that restricts where coins can be sent next, not just who can spend them; several Bitcoin proposals would enable them.

A covenant is a condition on how coins may be spent in the future, such as which outputs the spending transaction must create, rather than only who may spend them. Today's Bitcoin Script mostly checks signatures, hashes and timelocks; it can't inspect the outputs of the transaction spending it. Similar effects are possible with pre-signed transactions and deleted keys, but users must trust that the keys really were deleted.

Covenant proposals

Proposal What it adds
BIP 119 OP_CHECKTEMPLATEVERIFY (CTV) Requires the spending transaction to match a committed template hash
BIP 118 SIGHASH_ANYPREVOUT Signatures that aren't tied to one specific coin
BIP 345 OP_VAULT Purpose-built opcodes for vaults
BIP 347 OP_CAT Joins two stack items, a building block for covenants and more
BIP 348 OP_CHECKSIGFROMSTACK Checks a signature over arbitrary data
BIP 443 OP_CHECKCONTRACTVERIFY Lets outputs carry data and constrains the next outputs' scripts
BIP 446 OP_TEMPLATEHASH Pushes a hash of the spending transaction in Tapscript

Several are designed to be combined, for example a template opcode together with CHECKSIGFROMSTACK. Each would need a soft fork, and most use Tapscript's OP_SUCCESS upgrade hooks.

Why covenants are debated

Supporters point to vaults that guard against key theft, batched payments and congestion control, shared UTXO schemes, and simpler Lightning designs. Critics raise concerns about complexity, unexpected uses such as recursive covenants that restrict coins indefinitely, and effects on fungibility. There is also disagreement about which design is the safest and most useful.

Read more in the covenants guide, and compare designs in BIP 118 vs BIP 119 and BIP 119 vs BIP 347.

BIPs that define Covenant

  • BIP 119 (OP_CHECKTEMPLATEVERIFY): CHECKTEMPLATEVERIFY: Draft. Proposes CHECKTEMPLATEVERIFY, a script instruction that restricts coins so they can only be spent in a transaction matching a predetermined template. This 'covenant' could enable vaults that protect…
  • BIP 118: SIGHASH_ANYPREVOUT for Taproot Scripts: Draft. Proposes SIGHASH_ANYPREVOUT, a signature type for Taproot scripts that does not commit to the exact coin being spent, so one signed transaction can be attached to any compatible coin. This would…
  • BIP 345: OP_VAULT: Closed. Proposes two new script instructions that let users lock coins in a 'vault': any withdrawal must first wait out a delay, during which the owner can redirect the coins to a pre-chosen safe recovery…
  • BIP 347: OP_CAT in Tapscript: Complete. Brings back OP_CAT, an instruction that joins two pieces of data together, which was disabled in Bitcoin's early days over security concerns. Re-enabled only inside Taproot scripts, this simple…
  • BIP 348 (OP_CHECKSIGFROMSTACK): CHECKSIGFROMSTACK: Draft. Adds an instruction letting Bitcoin scripts verify a signature over any piece of data, not just over the spending transaction itself. That opens the door to things like delegating spending rights,…
  • BIP 443: OP_CHECKCONTRACTVERIFY: Draft. Proposes OP_CHECKCONTRACTVERIFY, an instruction that lets coins carry embedded data and restrict where they can be sent next and with what data. This lets users build multi-step contracts, such as…
  • BIP 446: OP_TEMPLATEHASH: Draft. Proposes OP_TEMPLATEHASH, a Taproot script instruction that produces a fingerprint of the transaction spending a coin. Scripts can use it to require that coins be spent only in a specific pre-agreed…

Related terms

  • Vault: A vault holds bitcoin so that withdrawals must wait out a delay, during which the owner can send the coins to a safe recovery address instead.
  • Tapscript: Tapscript is the script language for Taproot script paths (BIP 342): Bitcoin Script with Schnorr signature checks, OP_CHECKSIGADD and OP_SUCCESS hooks.
  • Opcode: An opcode is a one-byte instruction in Bitcoin Script, such as OP_CHECKSIG (0xac) or OP_RETURN (0x6a), that pushes data or acts on the stack.
  • Soft fork: A soft fork is a backward-compatible change to Bitcoin's consensus rules that only tightens them, so old nodes still accept the new blocks.

Learn more

Guides