TYPE 0x0707 · COMPOUND FAMILY

ANCHOR_FEE

L2-anchor compound block: 2-of-2 channel signatures + fee-rate hysteresis band + transaction weight ceiling, all bound to a commitment number. Designed for Lightning-style anti-pinning anchor outputs where both parties must agree, the spend must fall inside an honest fee-rate window, and the spending tx cannot exceed a fixed weight cap.

Compound Non-Invertible
ANCHOR_FEE 2-of-2 SIG + FEE BAND + WEIGHT CEILING All three components must pass — sigs valid, fee in band, weight under cap Closes the LN anchor pinning vector at the consensus level
FieldData TypeSizeSideDescription
scheme SCHEME 1 B Conditions Signature scheme (Schnorr, ECDSA, or any registered PQ scheme)
min_fee_rate NUMERIC 1–4 B Conditions Minimum acceptable fee rate (sat/vB)
max_fee_rate NUMERIC 1–4 B Conditions Maximum acceptable fee rate (sat/vB) — pinning ceiling
max_weight NUMERIC 1–4 B Conditions Maximum spending tx weight in WU. Caps oversized "pinning" txs
commitment_number NUMERIC 1–4 B Conditions Channel commitment number this anchor belongs to
pubkey[0..1] PUBKEY 32–33 B each Witness 2 public keys (local + remote channel parties), folded into Merkle leaf via merkle_pub_key
signature[0..1] SIGNATURE 64–65 B each Witness 2 valid signatures — both required (2-of-2)

Public keys folded into the Merkle leaf via merkle_pub_key (PubkeyCountForBlock = 2). No key fields in conditions.

1. HasRequiredPubkeys(block, 2): both PUBKEYs must be present in the merged block; else → ERROR. Identity bound at MLSC-proof level via merkle_pub_key.
2. Collect conditions NUMERICs. Fewer than 4 → ERROR. ReadNumeric all four (min_fee_rate, max_fee_rate, max_weight, commitment_num); any undecodable → ERROR
3. Sign/range guards: min_fee_rate < 0, max_fee_rate < 0, max_weight ≤ 0, or commitment_num < 0ERROR. min_fee_rate > max_fee_rateUNSATISFIED
4. Witness must contain ≥ 2 PUBKEYs and ≥ 2 SIGNATUREs (else → UNSATISFIED). 2-of-2 verification: greedy pairing — for each SIGNATURE, try each unused PUBKEY via VerifySigWithScheme(pk, sig, scheme=null); on SATISFIED, mark that pubkey used and move to the next sig. ERROR → propagate ERROR. Final valid_count < 2UNSATISFIED
5. Require ctx.tx, ctx.spent_outputs, ctx.tx_weight > 0; missing → ERROR (fail-closed). Compute fee = Σ(spent.value) - Σ(out.value); fee < 0UNSATISFIED
6. vsize = (tx_weight + 3) / 4 (BIP 141); vsize ≤ 0ERROR. fee_rate = fee / vsize (truncating; consensus uses the floor). fee_rate outside [min_fee_rate, max_fee_rate]UNSATISFIED
7. Weight cap: tx_weight > max_weightUNSATISFIED. All checks pass → SATISFIED
ConditionResult
Fewer than 2 PUBKEYs, fewer than 4 NUMERICs, any NUMERIC undecodableERROR
Negative fee/weight/commitment values, max_weight ≤ 0, missing tx context, or vsize ≤ 0ERROR
min_fee_rate > max_fee_rateUNSATISFIED
Witness has fewer than 2 SIGNATUREs, or fewer than 2 valid sig/pubkey pairingsUNSATISFIED
fee < 0 (outputs exceed inputs)UNSATISFIED
fee_rate floor outside [min_fee_rate, max_fee_rate]UNSATISFIED
tx_weight > max_weightUNSATISFIED
All checks passSATISFIED
Conditions (committed at fund time)
{
  "type": "ANCHOR_FEE",
  "inverted": false,
  "fields": [
    { "type": "SCHEME", "value": 1 },
    { "type": "NUMERIC", "value": 1 },
    { "type": "NUMERIC", "value": 100 },
    { "type": "NUMERIC", "value": 2000 },
    { "type": "NUMERIC", "value": 42 }
  ]
}

Fee-rate band [1, 100] sat/vB, weight ceiling 2,000 WU, commitment number 42, Schnorr signature scheme. Pubkeys appear in the witness only and are committed via merkle_pub_key.

Lightning Anchor Outputs (Anti-Pinning)
LN commitment transactions include small "anchor" outputs that any channel party can fee-bump to confirm the commitment. Without consensus-level constraints, an attacker can pin the anchor with a low-fee child tx of arbitrary size, blocking the legitimate party from CPFP'ing. ANCHOR_FEE binds the spend to a fee-rate band and a max weight at consensus, structurally closing the pinning vector.
Bounded-Cost Channel Closes
A unilateral channel close that must land inside a predictable fee window. The 2-of-2 sig requires both parties' agreement; the fee band caps the cost; the weight ceiling prevents oversized witnesses from inflating the close fee.
Cooperative Settlement with Fee Cap
A 2-party settlement where neither party can drag the other into an over-priced spend. Both sign, both have agreed to a fee corridor, both are protected from a runaway fee-rate environment.