OP_CHECKTEMPLATEVERIFY (OP_CTV) is available per BIP119.
OP_TXHASH / OP_CHECKTXHASHVERIFY is available per the current draft proposal, allowing scripts to hash and verify selected fields of the spending transaction
Relative timelocks exist (BIP68 / BIP112).
SHA256 preimage resistance holds, even if ECDSA/Schnorr signatures become forgeable.
An attacker may:
An attacker may not:
This construction creates a multi-phase envelope that separates:
Even if signatures are forgeable, funds can only move into a protected Anchor envelope, and from there only along template-bound paths.
The Phase 0 UTXO enforces the following:
Anchor pinning: Any spend MUST create exactly one value-bearing output whose scriptPubKey equals P_anchor.
No value leakage: No other value-bearing outputs are permitted. Transaction fees are paid by reducing the Anchor output amount.
Fee bound: The Phase 0 script MUST enforce a bound on fee extraction, e.g.:
These conditions are enforced using OP_TXHASH, selecting and verifying:
scriptPubKey of the Anchor output,Properties:
P_anchor.The Anchor envelope is now instantiated on-chain. An attacker may have triggered this spend... that's ok.
A Taproot script tree with two spending paths.
Conditions:
Relative depth gate The Anchor UTXO must have aged by at least k blocks (CSV).
Reveal check SHA256(x) == C.
Template enforcement The spending transaction MUST match template T via OP_CTV.
Conditions:
Template enforcement The spending transaction MUST match template E via OP_CTV.
No secret revealed The value x is not disclosed on this path.
The escape path may be immediately available or time-delayed
x plus any required non-cryptographic data.x.Quantum signature safety Forged signatures do not enable theft. All value is confined to the Anchor envelope before any secret is revealed.
No redirect-after-reveal Once x is revealed, OP_CTV pins the outputs.
Observation is sufficient If an attacker publishes Phase 0 or Phase 1 spends, the Anchor script still contains a usable escape hatch.
Reorg resistance The relative timelock k mitigates shallow reorg games
Graceful degradation A quantum attacker can force execution or cause delay or fee grief , but cannot steal value.