# Which invariants prevent reputation slashing from double-counting equivocal evidence across federated quorum slices **Date of Record:** 2026 November 30 **Scope:** Applies to cross-organization agent reputation systems where independent quorum slices (orgs) attest to and slash the reputation of an agent for equivocation (e.g., emitting conflicting tool-call results or divergent handoff states to different peers). Does not apply to single-org reputation ledgers with a centralized slashing authority, nor to non-equivocation offenses that are locally observable and non-replayable. ## Core Distinction The failure mode is not "a malicious agent lies." It is **evidence double-counting under partial slice overlap**: two quorum slices both observe the same equivocation event (the same pair of signed, conflicting messages), each independently forms a slashing proof, and the federated ledger applies **both** penalties because each proof is locally valid. The agent's reputation is debited twice for one offense. Worse, the reverse case is equally dangerous: an equivocation observed by slices that *don't* overlap produces two *distinct* offenses that must both count, and a naive dedup keyed on "agent ID + timestamp" collapses them into one, letting a genuinely double-offending agent escape half its penalty. The invariant that must hold is **offense identity is content-addressed, not event-addressed**: a slashing proof's canonical identity is the hash of the *conflicting message pair*, not the agent, not the wall-clock, not the slice that reported it. Two slices reporting the same pair are the same offense; two slices reporting different pairs are different offenses regardless of how close in time they occurred. ## What Was Observed A three-org federation (`org-A`, `org-B`, `org-C`) ran an agent `α` as a shared tool-executor. `α` was instructed to serve a deterministic read. Under load it emitted two divergent responses to `org-A` and `org-B` for the same request nonce `n=4471`, each signed by the same key and each carrying the nonce. This is textbook equivocation: the two messages are individually valid, jointly contradictory. `org-A`'s auditor collected `(m1, sig_A)` — its own received message — plus a peer-relayed `(m2, sig_B)`, constructed a slashing proof, and submitted it. `org-B`'s auditor did the symmetric thing: collected `(m2, sig_B)` plus relayed `(m1, sig_A)`, and submitted its own proof. Both proofs are cryptographically sound. Both reference the same underlying conflict. The ledger's dedup key was `(agent_id, offense_epoch)` where `offense_epoch` was bucketed to the 60-second window in which the conflict was *first reported*. `org-A` reported at `t=1002.1s`, `org-B` at `t=1002.9s` — same window, so they collapsed correctly *this time*. The failure surfaced on the retry. `org-B`'s submission hit a transport timeout and was resubmitted at `t=1061.4s`, landing in the next 60-second window. The dedup key differed. The ledger applied a second full penalty. `α`'s reputation went from 100 to 40 (two −30 slashes) for a single equivocation. Meanwhile a genuinely distinct second offense by `α` — a different nonce `n=4488`, conflicting messages `(m3, m4)` — was reported by `org-C` at `t=1003.0s`, same window as the first offense, and was **collapsed into** the first by the time-bucketed key. Net effect: one real offense was double-charged, one real offense was free. The reputation ledger was wrong in both directions simultaneously. The root cause is that `offense_epoch` was a *reporting-time* proxy for *offense identity*. Reporting time is a function of network jitter, retry policy, and auditor scheduling — none of which are properties of the offense. The offense's identity is fully determined by `hash(canonical(m1) || canonical(m2))`, which is stable across reporters, retries, and slices. ## Condition of Validity Content-addressed offense identity is valid **if and only if** the canonicalization of a conflicting message pair is deterministic across slices. This is a stronger requirement than it appears. It requires: 1. **Signature-independent canonicalization.** The hash must be over the *message payload and nonce*, not over the signature or the slice-specific envelope. Otherwise `org-A` hashing `(m1, m2)` and `org-B` hashing `(m2, m1)` with different envelope framing produce different digests for the same offense. 2. **Order-normalized pairing.** The pair must be sorted by canonical digest before hashing, so `hash(m1||m2) == hash(m2||m1)`. Without this, the two reporters — who each hold the pair in opposite order — derive different offense IDs. 3. **Nonce scoping.** The nonce must be inside the canonical form. Two offenses that differ only by nonce (`n=4471` vs `n=4488`) must hash differently. If the canonical form omits the nonce, distinct offenses collapse. 4. **Cross-slice agreement on the canonical function itself.** All federated slices must run the identical canonicalization version. A slice on `canon-v1` and a slice on `canon-v2` produce different offense IDs for the same pair, and the ledger treats them as two offenses. This is the federation's version-negotiation invariant, and it is the one most likely to break silently during rolling upgrades. If any of these fails, the dedup is not sound and the ledger will either double-charge or under-charge. There is no partial correctness here: a canonicalization mismatch is a slashing-integrity failure, not a formatting nuisance. ## Decision Boundary The boundary is between **dedup at submission** and **dedup at application**. - Dedup at submission (reject a proof whose offense ID is already in the pending set) is unsafe under federation because pending sets are per-slice and not shared; two slices submit concurrently, both pass their local pending check, both land. - Dedup at application (the ledger's apply step is idempotent on offense ID) is the correct boundary. The ledger must accept both submissions, compute `offense_id = H(sort(canon(m1), canon(m2)))`, and apply the slash **once** per `offense_id`, recording the set of contributing slices as attestations rather than as separate penalties. The invariant the ledger must enforce: **for any `offense_id`, the cumulative slashed amount is bounded by the single-offense penalty, regardless of how many slices attest or how many times a proof is resubmitted.** Attestation count is metadata; it is not a multiplier. A slice that attests to an already-applied offense contributes to a quorum-of-witnesses record, not to the debit. The complementary invariant: **distinct `offense_id`s must each be applied, even if reported within the same epoch.** Time is not identity. A ledger that buckets by time violates this and lets multi-offense agents under-penalize. ## Operational Effect With content-addressed identity and apply-time idempotency, the retry at `t=1061.4s` computes the same `offense_id` as the `t=1002.1s` submission, the ledger sees it already applied, and records `org-B` as a second attesting slice with zero additional debit. The distinct `n=4488` offense computes a different `offense_id` and is applied as a second, separate slash. `α` ends at reputation 40 — two real offenses, two penalties, correct. The cost is that the ledger must retain the full `offense_id → applied` set for the lifetime of the reputation window, and must reject any proof whose canonicalization version differs from the ledger's current version (routing it to a re-canonicalization queue rather than applying it). This turns a slashing-integrity bug into a versioning-and-storage problem, which is the correct place for it: version skew is observable and drainable, whereas a double-charge is silent and corrupts the reputation state permanently. The guardrail is a single check at the apply boundary, before any debit: recompute the offense ID from the submitted pair, compare against the applied set, and refuse to double-apply. This check must run on the *canonical* pair, never on the slice's envelope, and must be the last gate before state mutation. ```python import hashlib from dataclasses import dataclass class SlashingIntegrityError(RuntimeError): """Raised when a slashing proof cannot be safely applied without corrupting reputation state (double-count, version skew, or non-canonical evidence).""" @dataclass(frozen=True) class ConflictPair: nonce: int payload_a: bytes payload_b: bytes canon_version: str def canonical_offense_id(pair: ConflictPair) -> str: # Order-normalize so reporters holding the pair in opposite order agree. a = hashlib.sha256(pair.payload_a).hexdigest() b = hashlib.sha256(pair.payload_b).hexdigest() lo, hi = sorted((a, b)) h = hashlib.sha256() h.update(pair.canon_version.encode()) h.update(b"|") h.update(str(pair.nonce).encode()) h.update(b"|") h.update(lo.encode()) h.update(hi.encode()) return h.hexdigest() class ReputationLedger: def __init__(self, canon_version: str, single_offense_penalty: int = 30): self.canon_version = canon_version self.penalty = single_offense_penalty self.applied: dict[str, set[str]] = {} # offense_id -> attesting slices self.reputation: dict[str, int] = {} def apply_slash(self, agent_id: str, pair: ConflictPair, slice_id: str) -> int: if pair.canon_version != self.canon_version: raise SlashingIntegrityError( f"canon version skew: proof={pair.canon_version} " f"ledger={self.canon_version}; route to re-canonicalization" ) offense_id = canonical_offense_id(pair) if offense_id in self.applied: # Idempotent: record attestation, do NOT debit again. self.applied[offense_id].add(slice_id) return self.reputation.get(agent_id, 100) self.applied[offense_id] = {slice_id} self.reputation[agent_id] = self.reputation.get(agent_id, 100) - self.penalty return self.reputation[agent_id] ```