Block Reference
OUTPUT_COUNT
Governance Family
TYPE 0x0804 · GOVERNANCE FAMILY

OUTPUT_COUNT

Bounds on the number of outputs in the spending transaction. Controls fan-out behavior and prevents excessive output creation. No Tapscript equivalent.

Governance Invertible
OUTPUT_COUNT min ≤ tx.vout.size() ≤ max Controls output fan-out behavior
FieldData TypeSizeSideDescription
min_outputsNUMERIC1-4 BConditionsMinimum number of outputs required (≥ 0)
max_outputsNUMERIC1-4 BConditionsMaximum number of outputs allowed (≥ min_outputs)
0x0804 0 2 NUMERIC NUMERIC Conditions = 14 bytes
0x0804 0 0 Witness = 4 bytes
Total 20 bytes
1.Read min_outputs and max_outputs
2.Validate: min ≥ 0, max ≥ 0, min ≤ max. If invalid → ERROR
3.If no tx context → SATISFIED
4.Count outputs: if min ≤ count ≤ max → SATISFIED
5.Otherwise → UNSATISFIED
{
  "type": "OUTPUT_COUNT",
  "fields": [
    { "type": "NUMERIC", "value": 1 },
    { "type": "NUMERIC", "value": 2 }
  ]
}
Simple Transfer Enforcement
Setting max=2 forces the spend to create at most 2 outputs (payment + change). Prevents the UTXO from being used in batch payouts or CoinJoin-style transactions.
Covenant Output Structure
Combined with RECURSE_SAME, ensures the spending transaction creates exactly the right number of covenant outputs. Setting min=max=1 forces a 1-to-1 covenant chain.
Anti-Fragmentation
Capping output count prevents value fragmentation attacks where an adversary splits a large UTXO into many dust outputs to increase future spending costs.
← INPUT_COUNT RELATIVE_VALUE →