RATE_LIMIT
Rate limiter. Checks single-transaction output limits to prevent excessive value extraction per spend. Enforces per-block withdrawal caps with accumulation and refill parameters. No Tapscript equivalent exists.
PLC Invertible| Field | Data Type | Size | Side | Description |
|---|---|---|---|---|
| max_per_block | NUMERIC | 1-4 B | Conditions | Maximum output amount allowed per single transaction (NUMERIC[0]) |
| accumulation_cap | NUMERIC | 1-4 B | Conditions | Maximum accumulated withdrawal allowance (NUMERIC[1]) |
| refill_blocks | NUMERIC | 1-4 B | Conditions | Number of blocks between allowance refills (NUMERIC[2]) |
The single-transaction check (output_amount vs max_per_block) is evaluated directly. Full accumulation tracking requires UTXO chain state beyond this block's scope.
max_per_block; undecodable → ERROR. max_per_block < 0 → ERRORctx.output_amount > max_per_block → UNSATISFIED; else → SATISFIEDNote: The L1 evaluator only enforces the per-tx limit. accumulation_cap and refill_blocks are reserved for L2 protocols that track UTXO chain state — consensus parses them but does not validate or use them. A UTXO holder can drain max_per_block per transaction (potentially multiple txs per block); compose with RECURSE_SAME to enforce a single spend path per output.
| Condition | Result |
|---|---|
Fewer than 3 NUMERIC fields, max_per_block undecodable, or < 0 | ERROR |
output_amount > max_per_block | UNSATISFIED |
output_amount ≤ max_per_block | SATISFIED |
{
"type": "RATE_LIMIT",
"inverted": false,
"fields": [
{ "type": "NUMERIC", "value": 100000 },
{ "type": "NUMERIC", "value": 1000000 },
{ "type": "NUMERIC", "value": 144 }
]
}This creates a rate limiter allowing at most 100,000 sats per transaction, with a cumulative cap of 1,000,000 sats that refills every 144 blocks (~1 day).
max_per_block=100000, accumulation_cap=1000000, refill_blocks=144