TYPE 0x0303 · COVENANT FAMILY

AMOUNT_LOCK

Output amount range check. Verifies that the output value falls within a committed minimum and maximum range: min_sats ≤ output_amount ≤ max_sats. No witness data required — the output amount is read directly from the transaction context.

Covenant Invertible
AMOUNT_LOCK min_sats max_sats VALID RANGE × × min_sats ≤ output_amount ≤ max_sats → SATISFIED
FieldData TypeSizeSideDescription
min_satsNUMERIC1-4 BConditionsMinimum output amount in satoshis (inclusive). Decoded as int64; the evaluator does not reject negative values, but a negative min_sats simply broadens the lower bound.
max_satsNUMERIC1-4 BConditionsMaximum output amount in satoshis (inclusive). Decoded as int64. If max_sats < min_sats the range is empty and every spend returns UNSATISFIED — a deliberate "always-fail" composes via the inverted flag.

No witness fields required — the output amount is read directly from the spending transaction context.

0x0303 0 2 NUMERIC · 3B NUMERIC · 3B Conditions = 14 bytes
0x0303 0 0 Witness = 4 bytes (empty block)
Total 20 bytes
1.Collect all NUMERIC fields. If fewer than 2 → ERROR. The first is min_sats, the second is max_sats.
2.ReadNumeric on both. If either is undecodable → ERROR. Both are stored as int64; no sign or ordering check is performed.
3.Compare: ctx.output_amount ≥ min_sats && ctx.output_amount ≤ max_sats. If true → SATISFIED; otherwise → UNSATISFIED
ConditionResult
Fewer than 2 NUMERIC fieldsERROR
Either NUMERIC undecodableERROR
output_amount < min_satsUNSATISFIED
output_amount > max_satsUNSATISFIED
min_sats ≤ output_amount ≤ max_satsSATISFIED
Conditions (min 10,000 sats, max 1,000,000 sats)
{
  "type": "AMOUNT_LOCK",
  "inverted": false,
  "fields": [
    { "type": "NUMERIC", "value": 10000 },
    { "type": "NUMERIC", "value": 1000000 }
  ]
}

This constrains the output to carry between 10,000 and 1,000,000 satoshis. Outputs below the minimum (including dust) or above the maximum are rejected.

min_sats = 10,000, max_sats = 1,000,000

Output of 546 sats: 546 < 10,000 → UNSATISFIED (dust rejected)
Output of 10,000 sats: 10,000 ≥ 10,000 and ≤ 1,000,000 → SATISFIED (boundary)
Output of 500,000 sats: within range → SATISFIED
Output of 1,000,000 sats: 1,000,000 ≤ 1,000,000 → SATISFIED (boundary)
Output of 5,000,000 sats: 5,000,000 > 1,000,000 → UNSATISFIED
Minimum Output Enforcement
Prevent creation of economically unspendable outputs by setting a minimum above the dust threshold. Useful for protocols that need outputs to remain spendable without excessive fee ratios.
Dust Prevention
Exchanges and payment processors can enforce minimum withdrawal amounts at the script level, preventing users from creating dust UTXOs that bloat the UTXO set and cost more in fees than they are worth.
Value Range Constraints
Limit maximum output value for per-transaction spending caps. Combined with other covenant blocks, this enables spending policies like "hot wallet can move at most 0.01 BTC per transaction" without custodial intermediaries.
Inverted: Value Exclusion Zones
With the inverted flag, the block rejects outputs within the range — useful for excluding specific value bands. For example, preventing outputs in a range known to correlate with specific payment amounts for privacy reasons.