Verification Caching
Memoising the result of an expensive verification; unsound if the cache key does not capture everything the result depends on.
Verification caching is the practice of storing the result of an expensive cryptographic check — a signature validation, a range proof, a Merkle proof — so that repeat encounters with the same object skip the work. It is a standard and usually necessary optimisation in node software, where the same transaction may be validated on receipt, on block inclusion, and on reorg.
The soundness condition
A verification cache is sound only if its key captures everything the verification result depends on. If two distinct objects can produce the same cache key, the cache will return a result computed for one of them when asked about the other.
This makes the cache part of the verifier's trusted computing base. A perfectly correct verification routine behind an incorrectly keyed cache is, from an attacker's perspective, no verification at all — and it fails silently, reporting success rather than error.
Failure shape
The attack pattern is consistent:
- Submit a legitimate object that verifies successfully, populating the cache.
- Construct a malicious object that collides with the same cache key.
- Submit it. The node returns a cache hit and never evaluates the proof.
The September 2026 Liquid Network exploit followed exactly this shape — a cache-key collision in Elements' range proof verification, which allowed unbacked issuance without any federation key being compromised.
In audit scope
Enumerate every memoisation, short-circuit, "already validated" flag and early return on the path to a security-critical check. For each, ask what the key is derived from, and whether an attacker can construct two objects that share it while differing in a way the verification would have caught. A cache key that is a lossy digest of the verified object is a verification bypass.
Related Terms
Range Proof
A cryptographic proof that a hidden value lies within a valid range, without revealing the value itself.
Unbacked Mint
Issuance of a wrapped or synthetic asset with no corresponding reserve backing it.
Invariant
A property or condition that must always hold true throughout a smart contract's execution, used as a basis for testing and formal verification.
Replay Attack
An attack where a valid transaction or message is maliciously resubmitted to execute the same action multiple times.
Need expert guidance on Verification Caching?
Our team at Zealynx has deep expertise in blockchain security and DeFi protocols. Whether you need an audit or consultation, we're here to help.
Get a Quote