Covenant self-replication. Verifies the spending output carries identical rung conditions as the input. Creates perpetual covenant chains where each spend must re-encumber the output with the same conditions. No Tapscript equivalent.
RecursionInvertible
Ladder Diagram
Fields
Field
Data Type
Size
Side
Description
max_depth
NUMERIC
1-4 B
Conditions
Maximum recursion depth (> 0). Bounds the number of recursive spends allowed.
Wire Format Breakdown
0x040101NUMERIC · max_depthConditions = 9 bytes
0x040100Witness = 4 bytes
Total15 bytes
Evaluation Logic
1.Read max_depth from NUMERIC field
2.If max_depth ≤ 0 → UNSATISFIED
3.Retrieve input_conditions and spending_output from evaluation context
4.Deserialize output conditions from spending output
5.Compare using FullConditionsEqual — must match exactly
6.If conditions match → SATISFIED
7.Otherwise → UNSATISFIED
Worked Example
Perpetual vault with max_depth = 100
Input has RECURSE_SAME(100) + SIG(pubkey_A). Output must carry identical conditions.
The max_depth field bounds recursion depth. Typical values: 10–1000 depending on expected covenant lifetime.
Use Cases
Perpetual Vaults
A UTXO that can only ever be spent into an output with identical conditions. Combined with SIG or MULTISIG, creates a vault where the signing key can move funds but never remove the covenant restrictions.
Self-Enforcing Contracts
Contracts that guarantee their own perpetuation. Every spend must re-encumber the output with the same rules, ensuring the contract terms survive indefinitely across the UTXO chain.
State Machines
Combined with other blocks, creates state machines where the base covenant structure persists while external state (amounts, timelocks) may change through other block evaluations.