This deep dive expands on the covenant concepts mentioned in "Money that rules" and "Escrow without a company." It covers how introspection opcodes make covenants possible on BCH โ and what you can build with them. This is technical content for developers and the deeply curious.
A covenant is a restriction on how money can be spent. The word comes from property law: a covenant constrains the use of an object even after it changes hands. In Bitcoin Cash, the idea is literal. A contract can require that a coin be spent in a particular way, not just by a particular person.
Before introspection
BCH scripts have always been able to check who signed, when a spend is allowed, and whether a hash preimage is correct. Native introspection, activated in May 2022, added the ability to inspect the outputs of the transaction spending the coins. A contract can now read the values and locking scripts of outputs, the active input index, transaction fields, and token data on inputs and outputs. That is the foundation of covenants on BCH.
Rules that follow the coin
The simplest covenant restricts the destination. A vault can hold savings and send them only to a designated cold address. Even a compromised key cannot move funds outside that rule. The promise is enforced by the network, not by a policy document.
More interesting covenants constrain the shape of the transaction. A contract can require that part of the money return to the contract, that a token move with the payment, or that a specific output carry a particular commitment. That is how you build a recurring payment, a token pool, or a contract that carries state forward from one spend to the next.
The pattern is always the same: the contract inspects the transaction, checks the conditions, and either allows the spend or rejects it. The "state" is the set of coins and tokens the contract controls. Updating the state means spending them into a new output with the same contract lock.
What covenants make possible
- Vaults: savings that can only be withdrawn to a known address, with an optional delay.
- Inheritance: funds that a family key can claim after a long inactivity period.
- Recurring payments: an allowance that releases on a schedule and returns the remainder to the contract.
- Escrow: funds that can only pay the buyer or the seller, with an arbiter who cannot redirect them.
- Token protocols: contracts that enforce supply, minting, or redemption rules for CashTokens.
Rules you can verify
A covenant is powerful because it removes discretion. The rule is visible, deterministic, and enforced by every node. You can test it on chipnet, review it, and know exactly how it will behave. That is a stronger foundation than a policy document or a promise.
The 2026 P2S upgrade makes covenant transactions smaller and simpler, especially for vaults and multi-party applications. A well-designed covenant is a promise the network keeps โ and that is exactly what money needs.
For more on the technical foundation, see The script under every wallet and The 2026 upgrade.
We do not provide financial advice.