Block Reference
RECURSE_DECAY
Recursion Family
TYPE 0x0406 · RECURSION FAMILY

RECURSE_DECAY

Decaying covenant. Like RECURSE_MODIFIED but with negated deltas — targeted parameters decrease on each spend. Creates diminishing restriction curves where covenant parameters weaken over successive spends. No Tapscript equivalent.

Recursion Invertible
RECURSE_DECAY output[r][b][p] == input[r][b][p] - delta negated delta — parameters decay each spend multi-mutation support Decaying covenant — restrictions weaken with each spend
FieldData TypeSizeSideDescription
max_depthNUMERIC1-4 BConditionsMaximum recursion depth (> 0). Bounds the chain of decaying spends.
block_idxNUMERIC1-4 BConditionsTarget block index within rung 0 (legacy) or per-mutation target (new format).
param_idxNUMERIC1-4 BConditionsTarget parameter index within the block.
deltaNUMERIC1-4 BConditionsDecay amount. Negated before applying: effective change is -delta per spend.

Field layout matches RECURSE_MODIFIED exactly. Both legacy (4 NUMERICs, rung 0 implicit) and new (2 + 4N NUMERICs) formats are supported. The only difference is that delta is negated before application.

0x0406 0 4 NUMERIC · max_depth NUMERIC · block_idx NUMERIC · param_idx NUMERIC · delta Conditions (legacy) = 24 bytes
0x0406 0 0 Witness = 4 bytes
Total 28 bytes (legacy, single mutation)
1.Read max_depth from first NUMERIC field
2.If max_depth ≤ 0 → UNSATISFIED
3.Parse mutation specs (same format as RECURSE_MODIFIED)
4.Negate delta: effective_delta = -delta
5.Deserialize output conditions from spending output
6.Verify: all non-targeted parameters match input exactly
7.Verify: each targeted parameter equals input_value + effective_delta (i.e., input_value - delta)
8.All checks pass → SATISFIED
9.Any mismatch → UNSATISFIED

Decaying timelock: target param is CSV value=100, delta=10

Each spend reduces the timelock by 10 blocks.

Spend 1: CSV=100, effective_delta=-10, output CSV must be 90 → SATISFIED
Spend 2: CSV=90, output CSV must be 80 → SATISFIED
Spend 10: CSV=10, output CSV must be 0 → SATISFIED

Output tries to keep CSV unchanged:

Input CSV=100, output CSV=100 ≠ 100 - 10 = 90 → UNSATISFIED
{
  "type": "RECURSE_DECAY",
  "fields": [
    { "type": "NUMERIC", "value": 20 },
    { "type": "NUMERIC", "value": 2 },
    { "type": "NUMERIC", "value": 0 },
    { "type": "NUMERIC", "value": 10 }
  ]
}

Legacy format: max_depth=20, target rung 0 (implicit) block 2 param 0, delta=10 (decreases by 10 per spend). After 20 spends the depth limit is reached.

Diminishing Restrictions
Security restrictions that progressively relax over time. A new wallet might require a 144-block CSV delay that decreases by 6 blocks per spend, gradually increasing spending flexibility as trust is established.
Progressive Unlocking
A multisig threshold that decays from 3-of-5 toward 1-of-5 over successive spends. Early spends require strong quorum; later spends allow single-signer control as the covenant matures.
Decay Curves for Time-Value
A RELATIVE_VALUE ratio parameter that decays each spend, allowing progressively larger fee extraction. Initial spends preserve 99% of value; after N decay steps, preservation drops to 90%, creating a controlled value release schedule.
← RECURSE_SPLIT ANCHOR →