◆ Design Memo

Can Bitcoin outputs expire on their own?

A design walkthrough of three mechanisms for making witness-discounted UTXOs self-clean after a deadline — what miniscript can express today, what covenants would let us express tomorrow, and the boundary nothing short of a hard fork can cross.

3
Mechanisms compared
52,560
Blocks ≈ 1 year
~33 yr
Break-even for 10k-sat UTXO
0
Chain bytes deletable

§1The Question

"Could the protocol use miniscript to require that any transaction utilizing the witness discount sign a transaction every year, otherwise the transaction automatically spends itself and is removed from the dataset completely?"

The question compresses three asks: (a) encumber witness-discounted outputs with a yearly deadline, (b) auto-spend on expiry without anyone broadcasting, and (c) remove the data from the chain. Of those, (a) is trivially possible today with miniscript timelocks. (b) requires the protocol to originate transactions on its own — something Bitcoin's design fundamentally rejects. (c) requires retroactively editing blocks — which the append-only chain prohibits by construction.

But there's a productive reframing. If the active goal is "shrink the UTXO set after T," and we relax "auto-spend" to mean "any party can sweep it" — the question becomes tractable. This page walks three concrete mechanisms, with a covenant template, a worked numerical example for a 10,000-sat output, and an interactive widget for the holder-vs-miner economics.

§2Three Mechanisms, Side by Side

A — Anyone-can-spend after TB — Covenant-burn after TC — Consensus UTXO expiry
Deployable today?Yes (miniscript only)No — needs CTV / MATT / OP_VAULT soft-forkNo — hard fork
Who gets the sats?First miner to sweepBurned to OP_RETURN; tiny anchor to minerConfiscated (no spending tx)
Holder maintenanceRe-anchor tx fee yearlyRe-anchor tx fee yearlyRe-anchor tx fee yearly
Race dynamics at TYes — bots race for the sweep rewardMild — no profit, only mining feeNone
MEV surfaceCreates new MEV classAnchor-only MEV (small)None
Cleans UTXO set?
Removes chain bytes?
Self-custody safe?Only if opt-in per-outputOnly if opt-in per-outputNo — global rule confiscates dormant funds

Mechanism C is the cleanest technically and the worst politically — a consensus rule confiscating dormant UTXOs is essentially "soft-coup against Satoshi-era holders" and is unlikely to ever achieve consensus on Bitcoin. (See BIP-361's quantum sunset for the closest serious proposal and the debate it provoked.) Mechanisms A and B require opt-in per output at creation time to be remotely viable — which means they're not actually "protocol-mandated yearly resign" as the original question imagined. They're a script the user voluntarily encumbers their output with. That's a meaningful reframing.

§3Mechanism A — Anyone-Can-Spend After T

▶ Deployable today, no fork required
The simplest expression of "deadline-encumbered output" using only existing miniscript and Tapscript opcodes. Anyone — typically a profit-seeking miner or bot — can sweep the output after the deadline.

The miniscript

or_d(
  pk(owner),
  and_v(v:older(52560), 1)
)

Reads as: "spendable by owner's signature at any time, OR by anyone (no signature required) once 52,560 blocks (~1 year) have passed since this output was confirmed." The 1 in the second branch is the literal value true — the script's expiry path satisfies on its own with no witness data needed beyond the signal-no-sig push.

Compiled Tapscript

The compiler emits the following ~7-byte Tapscript leaf:

OWNER KEYpush the spending pubkey
20 <owner_pubkey>
OP_PUSHBYTES_32 <32-byte x-only pubkey>
33 B
0–32
CHECKSIGhappy path
ac
OP_CHECKSIG — if sig valid, leaves 1 on stack; else 0
1 B
33
IFDUP / NOTIFfall through if no sig
73 64
OP_IFDUP OP_NOTIF — if CHECKSIG returned 0, enter the expiry branch
2 B
34–35
TIMELOCKrelative, 1 year
02 50 cd b2
push 0xcd50 = 52,560 (LE)   OP_CHECKSEQUENCEVERIFY
4 B
36–39
TRUEanyone-can-spend
51 68
OP_1 (push true)   OP_ENDIF
2 B
40–41

~42 bytes for the script leaf. The expiry-branch witness is just <empty> — the would-be-signature slot is empty, CHECKSIG returns 0, NOTIF enters the timelock branch, CSV passes because nSequence ≥ 52,560, and the leaf evaluates true. Anyone can construct and broadcast the spending transaction.

⚠ Race dynamics

Once block T arrives, the output is free money to whoever spends it first. Bots watching the UTXO set will pre-build spending transactions and submit them at T. The honest owner's window is "before T," not "at T." Watchtower-style alerting becomes mandatory infrastructure for any holder using this script.

§4Mechanism B — Covenant-Required Burn After T

▶ Requires CTV / MATT / OP_VAULT soft-fork
Refines Mechanism A so the sweep is not profitable — the only legal spend after T is to a fixed OP_RETURN burn output plus a tiny ephemeral anchor for miner fee. No bot will race for the sweep because there's nothing to win.

The covenant template

Using CTV (BIP-119) syntax — OP_CHECKTEMPLATEVERIFY (opcode 0xb3, currently OP_NOP4) commits the entire spending transaction template (outputs, locktime, sequences) into a 32-byte hash baked into the script:

or_d(
  pk(owner),
  and_v(
    v:older(52560),
    ctv(H_BURN)
  )
)

Where H_BURN commits to a spending transaction with exactly two outputs:

Now the compiled Tapscript leaf adds the CTV commitment:

OWNER KEYpush the spending pubkey
20 <owner_pubkey>
OP_PUSHBYTES_32 <32-byte x-only pubkey>
33 B
CHECKSIGhappy path
ac
1 B
IFDUP / NOTIFfall through if no sig
73 64
2 B
TIMELOCKCSV ≥ 52,560 blocks
02 50 cd b2 75
push 52,560   OP_CSV   OP_DROP
5 B
CTV COMMITMENTforces the burn template
20 <H_BURN> b3
OP_PUSHBYTES_32 <32-byte template hash>   OP_CHECKTEMPLATEVERIFY
34 B
ENDIF
68
1 B

~76 bytes total leaf. The expiry witness is again <empty> — CTV checks the spending transaction's structure against H_BURN with no signature needed; if the spender constructed any other transaction, CTV fails and the spend is invalid.

◆ Why burn changes the incentive structure

Under Mechanism A, the miner who sweeps gets nearly the entire output value. So bots will race, MEV will form, and an "expiry" of a 5-BTC Lightning channel becomes a 5-BTC giveaway to the lucky miner.

Under Mechanism B, the miner gets only the 240-sat anchor (likely under 100 sats of profit after fee). There's almost no incentive to race. The output value vanishes, which is what "removed from the dataset" was emotionally trying to mean. The holder is no worse off than under A — they lose the funds either way if they fail to re-anchor.

§5Worked Numerical Example

A single specimen carried through both mechanisms. Inscription-commit scale.

Specimen parameters
Output value at creation10,000 sats
Deadline T52,560 blocks (~1 year, BIP-68 relative)
Re-anchor tx size (holder)~150 vB (P2TR key-path spend + P2TR change)
Re-anchor fee @ 2 sat/vB300 sats / year
Sweep tx size (Mechanism A, miner)~120 vB (script-path spend, empty witness branch)
Sweep fee @ 2 sat/vB240 sats
Burn anchor value (Mechanism B)240 sats

If the holder maintains the output (both mechanisms)

Each year they broadcast a re-anchor tx that spends the encumbered UTXO via the key-path and creates a new identical encumbered UTXO. Cost: 300 sats/year.

The output is worth 10,000 sats. At 300 sats/year, the break-even point is 10,000 / 300 ≈ 33 years. Beyond 33 years of dormant maintenance, the holder has paid more in re-anchor fees than the output is worth. Rational holders abandon at or before year 33.

For a smaller output — say 1,000 sats — the break-even is 1,000 / 300 ≈ 3 years. Below the dust threshold the rational move at creation is "don't bother." This is the desired self-cleanup property: tiny outputs aren't worth maintaining, so they fall off the UTXO set automatically as their owners rationally decline to re-anchor.

If the holder abandons — Mechanism A

PartyΔ at expiry
Holder−10,000 sats (entire output lost)
First-mover miner+9,760 sats (10,000 − 240 fee)
Network total0 sats (wealth transfer, no net destruction)

If the holder abandons — Mechanism B

PartyΔ at expiry
Holder−10,000 sats (entire output lost)
Miner (anchor + sweep fee)+~150 sats (240 anchor − ~90 in CPFP overhead)
Burned to OP_RETURN9,520 sats (sats provably destroyed)
Network total−9,520 sats (deflationary)

Under B, the 9,520 sats are removed from circulation — every node's UTXO accounting agrees they no longer exist. The chain's economic supply contracts by that amount, which is exactly what "removed from the dataset" should mean in any rigorous sense.

§6Interactive: Deadline Economics

Adjust the parameters below to see how the maintenance burden and break-even point change for different output values and fee rates:

▶ Holder vs. miner economics

§7Why None of This Removes Chain Bytes

All three mechanisms shrink the UTXO set — the live spendable-state database every full node holds in RAM/disk (~5 GB). None of them shrink the historical chain — the append-only block record every archival node stores (~650+ GB and growing). When a UTXO is spent (whether by the owner, by anyone-can-spend after T, or by covenant burn), the spending transaction is a new entry on chain. The original output's bytes — including any inscription witness payload — remain in their original block forever.

If the underlying intent is "make the inscription pixels stop existing on every node forever," none of A/B/C achieve that. The only mechanism that does is per-node witness pruning, which is its own deep rabbit hole. See Appendix G of the txbook for the C++-level walk-through of why even selective witness pruning is hard with Bitcoin Core's current storage layout.

§8The Targeting Problem

The original question targeted "any transaction utilizing the witness discount." But the witness discount is universal — it applies to:

A protocol rule that universally encumbered witness-discounted outputs with yearly expiry would force every Bitcoin user under SegWit / Taproot to:

The only honest way to target inscription-style data without taking down all modern self-custody is one of:

  1. Opt-in script encumbrance. Anyone creating an output writes the expiry into their own script. The protocol doesn't enforce; the script does. This is Mechanism A or B applied by user choice, output by output. Effective only for users who want their own outputs to expire.
  2. Content-aware policy filtering. Discriminate at the relay layer based on what's in the witness — for example, refuse to relay transactions with an OP_FALSE OP_IF "ord" envelope. This is exactly the content filtering Bitcoin Core publicly committed not to do in its 2025-06-06 relay statement, and would in any case be trivially circumvented by direct submission to miners.
  3. Tiered witness pricing. A soft fork that recomputes the weight formula so the witness discount only applies to the first N bytes per transaction, with full price above that. Discourages large payloads at the fee-market layer without expiring anyone's outputs.

§9Where This Fits in Existing Proposals

ProposalMechanismStatusComparison
CTV / CSFS / MATT / OP_VAULT Covenant primitives — output script can constrain its spending tx's structure Active mailing-list debate; none deployed The required primitive for Mechanism B
BIP-361 quantum sunset Soft fork that sunsets ECDSA spends after a deadline; STARK-based rescue path Draft Same shape as Mechanism C, but triggered by quantum threat, not calendar time
PACTs (Dan Robinson / Paradigm) Opt-in BIP-322 + OpenTimestamps + future STARK rescue Proposed 2026-05 Complements BIP-361 by giving pre-BIP-32 holders a rescue path; no expiry component
Mike Casey's Hourglass Velocity cap: limit P2PK spending to 1 BTC/block Proposal stage "Tax old behavior" energy; different lever (velocity vs. expiry)
Witness pruning (txbook Appendix G) Per-node storage optimization, not consensus Researched, not built Addresses the chain-bytes side of the problem this page can't touch

§10Open Questions

A design memo from the txbook §19 conversation. Specimens are illustrative; no protocol change has been proposed or implemented to support these scripts at the consensus layer.