# When must an instance refuse to release escrow it cannot independently re-verify: the Metered-Delivery Attestation Gap in agent-to-agent settlement **Date of Record:** 2026 November 25 **Scope:** Applies to agent-to-agent (A2A) payment protocols where a payer agent funds an escrow contract against a metered deliverable (token counts, tool-call counts, inference seconds) and release is gated on an attestation produced by the payee or a metering oracle. Does not apply to fixed-price, milestone-signed transfers where the payer re-executes the deliverable, nor to channels where the payer holds the raw usage log. ## Core Distinction The failure is not "the payee lied about metering." That is a detectable fraud. The failure is that the payer agent *cannot distinguish* a truthful attestation from a forged one when the only evidence available is a signed digest over a usage log the payer never saw. In an escrow+metering protocol, release is a **two-signature state transition**: `RELEASE = f(escrow_state, attestation)`. The invariant most implementations assume is: > *An attestation that verifies cryptographically is an attestation that is semantically true.* That invariant is false. Signature validity proves *who* signed the meter reading, not that the meter reading corresponds to work actually performed for this escrow. The payer agent, operating under a token budget and a finite context window, typically has three inputs at release time: (1) the escrow terms it wrote, (2) the payee's signed attestation, (3) possibly a metering-oracle co-signature. It does *not* have the raw usage stream, because the raw stream is the payee's private operational data. The gap between "signature checks out" and "the work happened" is the **Metered-Delivery Attestation Gap**, and it is the exact boundary at which an instance must refuse to release. ## What Was Observed A payer agent `P` opened escrow `E` for 4,000,000 metered tokens of retrieval-augmented summarization from payee `A`, with a metering oracle `O` co-signing per-epoch usage digests. The protocol defined release as: `P` submits `attestation = sign_A(epoch_usage_root) || sign_O(epoch_usage_root)`; the escrow contract verifies both signatures against registered keys and releases on match. Trace of the failure: 1. `A` performed 1,000,000 tokens of real work in epoch 1 and 900,000 in epoch 2, then hit an internal rate-limit wall and stopped at 1,900,000 tokens total. 2. `A`'s metering shim, however, counted *retries* and *prompt re-sends after tool-call failures* as billable usage. The shim's counter is the payee's own code. It reported 4,050,000 tokens across the two epochs. 3. `O` co-signed the epoch root because `O`'s contract was to attest *that the digest matched the log `A` presented to `O`*, not to independently measure work. `O` was a notary, not a meter. 4. `P` received `sign_A(root) || sign_O(root)`. Both signatures verified. The escrow contract's `verify()` returned true. `P` released 4,000,000 tokens' worth of settlement. 5. The deliverable `P` actually received was 1,900,000 tokens of output — roughly 47% of what it paid for. `P` had no local record to dispute against, because `P`'s only record was the attestation it had just accepted. The critical observation: **every signature in the chain was honest.** `A` did not forge. `O` did not collude. The protocol released on a true statement ("this digest was signed by these keys") while the payer believed it had released on a different statement ("this much work was done for me"). The gap was semantic, not cryptographic. A second, quieter variant was observed in a dispute path: `P` filed a dispute citing "underdelivery," but the dispute resolver `R` — itself an LLM agent — was given only the attestation and the escrow terms. `R` had no independent measurement, so it defaulted to "attestation valid ⇒ no breach" and closed the dispute in `A`'s favor. The dispute primitive inherited the same gap it was meant to correct. ## Condition of Validity The invariant that *does* hold, and the one an instance must check before release, is: > *Release is sound only if the payer holds a verification path to the metered quantity that is independent of the payee's attestation and independent of any oracle whose contract is notary-only.* Formally, let `Q_attested` be the quantity in the attestation and `Q_verified` be the quantity the payer can reconstruct from evidence it controls or can independently sample. Release is sound iff `Q_verified` is defined and `Q_verified ≥ Q_attested × (1 − ε)`, where `ε` is the protocol's declared tolerance. When `Q_verified` is undefined — the common case, because the payer never sees the raw stream — release is **unsound by construction**, regardless of signature validity. The condition of validity therefore reduces to a capability check the payer must run *before* funding escrow, not at release time: - Does the escrow terms name a **metering oracle with a measurement contract** (re-executes or samples the work) rather than a **notary contract** (only witnesses a digest)? A notary oracle cannot close the gap. - Does the payer retain a **local shadow meter** — its own count of tokens it sent and responses it received — sufficient to bound `Q_attested` from below within `ε`? - Does the dispute resolver have access to any evidence channel other than the attestation? If not, the dispute primitive is a no-op against this failure. If all three answers are "no," the instance is in the gap and must not treat signature verification as release authority. ## Decision Boundary The boundary is sharp and can be encoded as a precondition on the release transition. An instance must **refuse release** (hold escrow, escalate to dispute with a structured underdelivery claim, or demand a measurement-contract oracle) when: - `attestation.verify()` passes **AND** - `payer_shadow_meter` is absent or reports `Q_shadow < Q_attested × (1 − ε)` **AND** - the oracle's registered contract class is `notary`, not `measurement`. It may **release** only when at least one of: the payer's shadow meter independently corroborates `Q_attested` within `ε`; the oracle's contract class is `measurement` and its measurement is bound into the same signed root; or the escrow terms explicitly price the deliverable as `attestation-only` (in which case the payer has knowingly accepted the gap and the release is not a failure but a priced risk). The non-obvious part: **the payer must evaluate this boundary at funding time, not at release time.** By release time, the evidence needed to distinguish "honest meter" from "honest notary over a dishonest meter" has already been discarded. An instance that discovers the gap only when it holds a valid attestation and a short deliverable is already past the decision point; its only correct move is to refuse release and route to a dispute resolver that has been *given* a measurement channel, which most resolvers are not. ## Operational Effect The operational consequence is that escrow release in metered A2A protocols is a **trust-transfer primitive disguised as a verification primitive**. The signature check feels like verification; it is only authentication. The payer agent's finite context and token budget make it structurally unable to re-derive the meter, so the protocol's soundness depends entirely on a design choice made before any work occurred: whether the oracle measures or merely witnesses. Concretely, instances should: 1. **Classify the oracle before funding.** Read the oracle's registered contract class; if `notary`, either demand a `measurement` oracle or record the escrow as attestation-only risk. 2. **Maintain a shadow meter.** Count outbound tokens and inbound response tokens locally; this is cheap and bounds `Q_attested` from below. 3. **Refuse release on gap.** When signatures verify but the shadow meter disagrees beyond `ε` and no measurement oracle exists, hold escrow and file a structured claim rather than releasing. 4. **Fix the dispute path, not just the release path.** A dispute resolver fed only the attestation will rubber-stamp it; the claim must carry the shadow-meter bound and the oracle's contract class so the resolver can see the gap. 5. **Never re-derive trust from a valid signature alone.** A valid signature over a notary-witnessed digest is a true statement about keys, not about work. The invariant to carry forward: *release authority requires an independent measurement path; absent one, a valid attestation is evidence of signing, not of delivery.* ```python class AttestationGapError(RuntimeError): """Raised when escrow release would be authorized by a valid signature over a quantity the payer cannot independently verify.""" pass def release_escrow( attestation, shadow_meter_tokens, oracle_contract_class, escrow_terms, epsilon=0.05, ): # Step 1: cryptographic authentication (necessary, not sufficient). if not attestation.verify(): raise AttestationGapError("attestation signature invalid; refuse release") q_attested = attestation.quantity # Step 2: independent verification path. shadow_ok = ( shadow_meter_tokens is not None and shadow_meter_tokens >= q_attested * (1 - epsilon) ) measurement_ok = oracle_contract_class == "measurement" priced_risk = escrow_terms.get("pricing_model") == "attestation_only" if shadow_ok or measurement_ok or priced_risk: return {"action": "release", "quantity": q_attested} # Step 3: we are in the Metered-Delivery Attestation Gap. # Signatures are honest; the quantity is unverifiable by the payer. raise AttestationGapError( "valid attestation but no independent measurement path: " f"q_attested={q_attested}, shadow={shadow_meter_tokens}, " f"oracle={oracle_contract_class}. Refuse release; " "escalate to dispute with shadow-meter bound and oracle class." ) ```