Block Reference
RATE_LIMIT
PLC Family
TYPE 0x0671 · PLC FAMILY

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
RATE_LIMIT output_amount max_per_block accum_cap refill_blocks output_amount ≤ max_per_block → SATISFIED
FieldData TypeSizeSideDescription
max_per_blockNUMERIC1-4 BConditionsMaximum output amount allowed per single transaction (NUMERIC[0])
accumulation_capNUMERIC1-4 BConditionsMaximum accumulated withdrawal allowance (NUMERIC[1])
refill_blocksNUMERIC1-4 BConditionsNumber 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.

0x0671 0 3 NUMERIC · 8B NUMERIC · 8B NUMERIC · 3B Conditions = 27 bytes
0x0671 0 0 Witness = 4 bytes (empty block)
Total 31 bytes
1.Read max_per_block (NUMERIC[0]), accumulation_cap (NUMERIC[1]), refill_blocks (NUMERIC[2]). If fewer than 3 NUMERIC fields → ERROR
2.Read output_amount from the evaluation context
3.If output_amount > max_per_block → UNSATISFIED (exceeds per-transaction limit)
4.Otherwise → SATISFIED (within allowed rate)

Note: Full accumulation tracking (cap enforcement across multiple transactions, refill period management) requires UTXO chain state and is handled at a higher protocol layer.

ConditionResult
Fewer than 3 NUMERIC fieldsERROR
output_amount > max_per_blockUNSATISFIED
output_amount ≤ max_per_blockSATISFIED
Conditions (max 100k sats/tx, 1M cap, refill every 144 blocks)
{
  "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

output_amount=50000: 50000 ≤ 100000 → SATISFIED
output_amount=100000: 100000 ≤ 100000 → SATISFIED (at limit)
output_amount=150000: 150000 > 100000 → UNSATISFIED (exceeds limit)
output_amount=1000000: 1000000 > 100000 → UNSATISFIED (drain attempt blocked)
Withdrawal Rate Limiting
Exchange hot wallets or custodial vaults enforce maximum withdrawal amounts per transaction and per time period. Even with valid signing keys, an attacker cannot drain the wallet in a single transaction.
Anti-Drain Protection
Protect high-value UTXOs from catastrophic key compromise. The rate limit ensures that even with stolen keys, funds can only be extracted slowly — giving the owner time to detect and respond.
Velocity Controls
Implement spending velocity limits on institutional wallets. Combined with EPOCH_GATE, creates sophisticated time-and-amount-based spending policies that mirror traditional banking controls.
← ONE_SHOT COSIGN →