First, a quick milestone update: PR#2137has been merged into ethereum/ERCs:master!
It enforces verificationTier = 0 at initial registration, introduces verificationExpiry, dynamic getEffectiveTier() evaluation, and ensures reputation updates cannot renew expired certifications. Thanks @Revinand for the sharp review!
Following an internal audit of interface edge cases and the insightful feedback from @SergeevDmitry and @sen_vouch, we would like to submit the following Hardening RFC to the community for discussion before drafting the next PR:
Current Issue: isKnownAttacker returns true if any recorded incidents exist. If an authorized oracle reports a false positive, an innocent agent is permanently blacklisted with no standard mechanism for remediation.
Proposed Resolution:
Introduce an explicit IncidentStatus state machine:
Extend AttackRecord to track uint256 incidentId, address reporter, and IncidentStatus status.
Add a retraction method callable only by the original reporter or governance:
function retractAttack(uint256 incidentId, string calldata reason) external;
Invariant: isKnownAttacker(agent) MUST return true if and only if there exists at least one incident with status == IncidentStatus.ACTIVE.
2. DID Front-Running & Registration Authorization
Current Issue: registerAgent(did, publicKey, metadataURI) does not explicitly bind msg.sender to the agent address embedded in did:agent:<chainId>:<address>, allowing malicious third parties to squat high-profile agent identities.
Proposed Resolution:
Add normative invariant: registerAgent MUST verify that msg.sender == extractedAgentAddress, OR:
Support delegated factory registrations via an EIP-712 typed signature from the agent wallet:
Active State Invariant: In IAgentIdentityRegistry, ensure isVerified(agent) checks both agent.isActive && getEffectiveTier(agent) > 0. Add deactivateAgent() / reactivateAgent() callable by the agent controller.
On-Chain Attack Record Getter: In IThreatRegistry, add a dedicated getter to inspect full incident details:
function getAttackRecord(uint256 incidentId) external view returns (AttackRecord memory);
Standardized Threat Layer Taxonomy: Replace ambiguous uint8 layer with an explicit enum:
Transaction Telemetry: Either define standard updating methods (recordTransactionResult) or remove un-updated counter fields (totalTransactions, successfulTransactions) from the core minimal interface to avoid orphan state.
What exactly would RESOLVED mean here? A confirmed attack that has been remediated is different from a false positive that was retracted. Both would make isKnownAttacker return false under the proposed rule. Should the boolean instead describe active threats while confirmed historical incidents remain separately queryable? I would also specify who may mark an incident RESOLVED and test that resolving one incident cannot clear the flag while another remains ACTIVE.
Spot-on distinction, @SergeevDmitry. You’ve pinpointed an essential nuance between an erroneous attribution and a remediated historical exploit.
Here is the exact architectural specification we are adopting based on your feedback:
1. Semantic Separation: Active Defense vs. Historical Lineage
We decouple the immediate execution firewall from historical risk underwriting:
hasActiveThreat(address agent) -> bool (and isKnownAttacker for backward compatibility):
Evaluates strictly whether the agent poses an immediate, un-remediated risk. It returns true if and only if activeIncidentCount[agent] > 0.
getIncidentSummary(address agent) -> (uint256 active, uint256 resolved, uint256 retracted):
Exposes the full breakdown. This gives consuming protocols granular policy control:
Dynamic Defense (Standard): Reverts if active > 0 (caller cannot execute while under active investigation).
Zero-Tolerance / Institutional Underwriting: Reverts if active > 0 || resolved > 0 (permanently excludes any agent with confirmed historical exploit records, even if remediated).
retracted records are preserved for oracle accountability but completely excluded from threat evaluations.
2. Authorization Boundaries
retractAttack(uint256 incidentId, string reason):
Restricted exclusively to the original reporting entity (to correct an honest false positive) or the governance dispute module. The agent has zero authorization to retract.
resolveAttack(uint256 incidentId, string remediationURI):
MUST NOT be callable by the subject agent. It requires attestation by an authorized verification oracle, designated security auditor, or governance consensus certifying that the exploit condition, vulnerability, or financial restitution has been formally validated.
3. Independent State Machine Invariant
To guarantee that resolving or retracting one incident cannot clear an agent while another remains active:
The registry maintains an activeIncidentCount[agent] mapping.
recordAttack: transitions state to ACTIVE and increments activeIncidentCount[agent].
retractAttack / resolveAttack: verifies the incident is currently ACTIVE, updates the incident status, and decrements activeIncidentCount[agent].
Invariant: hasActiveThreat(agent) is strictly equivalent to activeIncidentCount[agent] > 0. If Incident A is marked RESOLVED while Incident B is ACTIVE, activeIncidentCount remains >= 1 and the blocking flag remains asserted.
We will add a dedicated conformance case (T7) specifically verifying this independent lifecycle invariant.
Thanks @ibonon for incorporating this. Starting registrations at tier 0, with a separate authorized promotion, addresses the registration issue. The dedicated expiry and the explicit rule that reputation updates cannot extend it also address my concern about stale verification.
Could we also make explicit that calculateTrustScore() uses getEffectiveTier() for any tier-based weighting? For example, after Gold verification expires, the agent should lose any Gold multiplier even if its stored verificationTier remains 3. Its reputation score can stay unchanged. The verification benefit should expire. That would keep trust scoring consistent with isVerified(), so consumers don’t accidentally retain the benefit of an expired certification. A conformance test covering expiry followed by a reputation update would help check that the expired tier contributes no boost in either case.
Thank you @Revinand — that is exactly the right consistency concern.
We have addressed it with the following explicit normative rule:
calculateTrustScore MUST derive any tier-based weighting from getEffectiveTier(agentAddress) rather than reading AgentIdentity.verificationTier directly. After expiry, the tier
contribution to the trust score is zero, even though the stored field
retains its value. The agent’s reputationScore is unaffected.
This means: Gold verification expires → getEffectiveTier() returns 0 →
Gold multiplier drops to zero in calculateTrustScore → isVerified() and calculateTrustScore are now consistent by construction.
We also added conformance test T8:
Promote agent to tier 3 (Gold)
Advance past verificationExpiry
Call updateReputationScore (must not extend expiry — T5 boundary)
Assert getEffectiveTier() == 0
Assert calculateTrustScore post-expiry < score while active (zero tier boost)
I turned T8 into runnable tests with a small test registry. They advance time, compare equal reputation, and cover the exact expiry boundary plus capped scores. All 7 pass.
Thank you @ted0x the assertExpired pattern comparing against a tier-0 control at equal reputation is more precise than our original scoreAfterExpiry < scoreWhileActive which breaks at saturation — as test_T8_doesNotRequireStrictScoreDecrease correctly catches. The abstract TrustScoreExpiryChecks base is exactly the adapter pattern a conformance suite needs. PR #2141 approved
[ERC-8259 Internal Audit Finding] Invariant Clarification: Inactive Agents in getEffectiveTier() and calculateTrustScore()
Following the merge of PR #2137 (verification expiry) and PR #2141 (Foundry test suite), we conducted an adversarial security audit on edge-case combinations across agent states. This review surfaced an invariant omission in the current draft regarding deactivated agents.
The Flaw
The AgentIdentity struct defines a bool isActive field to indicate whether an identity is currently operative (e.g. decommissioned, slashed, or revoked by governance).
However, under the wording introduced in PR #2137:
getEffectiveTier(agent) explicitly stated: “MUST return 0 if block.timestamp > verificationExpiry”, but omitted the requirement to evaluate !isActive.
As a consequence, if an agent holding a valid tier (e.g. Tier 2 Silver) was deactivated prior to its expiry timestamp, getEffectiveTier() continued returning 2, isVerified() returned true, and calculateTrustScore() continued awarding the full tier multiplier.
This allowed revoked agents to continue passing downstream guards (such as ERC8259Guard’s onlyVerifiedAgent and minTrustScore).
// Alice is verified at Tier 2 for 30 days
registry.updateVerificationTier(ALICE, 2, 30 days);
require(registry.isVerified(ALICE), "Alice verified");
// Governance deactivates Alice (e.g. rogue behavior or key compromise)
registry.deactivateAgent(ALICE);
// Invariant requirement:
require(registry.isVerified(ALICE) == false, "Inactive agent must not be verified");
require(registry.getEffectiveTier(ALICE) == 0, "Inactive agent effective tier must be 0");
require(registry.calculateTrustScore(ALICE) == 0, "Inactive agent trust score must be 0");
Proposed Specification Update
We propose a lightweight normative amendment to erc-8259.md and IAgentIdentityRegistry.sol:
getEffectiveTier: MUST return 0 if !isActive OR block.timestamp > verificationExpiry.
isVerified: MUST return false if !isActive or getEffectiveTier <= 0.
calculateTrustScore: MUST return 0 if !isActive.
The reference NPM package has been updated in erc-8259@1.3.0.
Reviving this thread because autonomous bots are moving fast, and we really need clear rules for them now. I like tying model hashes to wallets, but how do we stop someone from just spinning up fresh addresses after a bad score? Has anyone tested the threat tiers with cross-chain setups yet, or found a simple way to sync trust scores across different rollups without crazy gas fees?
Glad this got revived — this is exactly the design space ERC-8259 targets, so
here’s how we approach all three points.
Fresh addresses after a bad score
The fix is to stop binding reputation to wallets. In ERC-8259 reputation is
bound to an agent identity (an AgentRegistry entry / DID); wallets are just
rotating signing keys delegated to that identity. A freshly generated address
belonging to the same agent inherits the same score, so “spin up a new wallet”
buys nothing.
What’s left is spinning up a fresh identity, and that’s where friction +
propagation come in:
Registration cost / stake so a clean identity is not free (economic Sybil
cost — you raise the price, you don’t “solve” it).
Tiered verification: new identities start at the lowest tier and cannot reach
high-value paths until they pass independent attestation. Tier/score gating
(getEffectiveTier / isVerified / calculateTrustScore) returns 0 / false for
inactive or unverified entries.
Incident lifecycle (retract_attack / resolve_attack) + verification_expiry:
flags attach to the identity and decay, so you get fast quarantine without
permanent griefing, and a dormant identity can’t be resurrected as “clean”.
Model-hash binding: the model hash is what actually acts, so a negative
signal on the hash propagates to any identity presenting the same hash —
re-registering the same bot doesn’t reset it.
None of this is a proof of uniqueness; it’s defense-in-depth plus economic
cost, which I’d argue is the honest bar here.
Threat tiers with cross-chain setups
Per-chain implementations exist today: Starknet agent_reputation.cairo
(Cairo 2.8.4), an Aptos threat_registry.move, plus the Solidity guard. The
tier logic and incident lifecycle have adversarial test coverage
(LogicFlawsAudit / IncidentLifecycle / AdversarialAttacks suites).
Cross-chain propagation is designed as periodic attestation through a bridge
(NexusMindSiguiBridge), not per-tx mirroring — the cross-chain signal is one
of the 6 scoring inputs (~10%). [I’d want to state exactly what has been run
end-to-end, on which testnet pairs, before claiming a “tested” result — happy
to follow up with the specifics rather than hand-wave.]
Syncing trust scores across rollups without crazy gas
Principle: reputation reads are high-frequency, writes are rare. So don’t
write on every update.
One canonical registry; rollups are readers. Consumers verify a storage/state
proof against the canonical chain instead of syncing full state.
Batching + Merkle roots: publish one root per epoch; a rollup proves
inclusion of a single agent with an O(log n) proof. Gas is amortized across
every agent in the batch.
Signed attestations (EAS-style): most reads happen off-chain against a
signed score; you only settle on-chain for high-value actions.
Optimistic + fraud proofs: assume synced, let anyone challenge with a proof —
disputes become the only on-chain cost.
Transport can be ERC-7786 / CCIP / LayerZero, but keep the policy
(thresholds, tiers) on the canonical source so you’re not reconciling N
divergent copies.
Happy to share the spec and the npm package (erc-8259) if useful — and very
interested to hear where this breaks under adversarial conditions, especially
around identity-level Sybil costs and cross-rollup proof availability.
For the cross-rollup part, I’d avoid mirroring every reputation delta on every chain. Make one chain authoritative for identity and score, then have other chains consume signed checkpoints or Merkle roots via the messaging layer. Local guards can check a cached tier plus expiry for low-value paths, and fall back to a home-chain proof for high-value actions. Batch score updates into roots to keep gas down, while threat signals can propagate as smaller priority messages. This keeps fresh-wallet Sybil resistance tied to the identity rather than the chain-local address.
Spot on, 100% agree with this. Mirroring every delta across rollups would be a gas nightmare and an asynchronous headache to maintain.
The hub-and-spoke setup you’re describing fits right into the design:
Canonical identity:did:agent:<chainId>:<address> already anchors the source of truth to a specific home chain.
Asymmetric lanes: Scores can easily be batched into periodic roots (slow lane), while active threat signals (recordAttack) get fast-tracked as priority messages so other rollups can block exploits immediately.
Dual-path guards: Love the cached vs proof distinction. Routine calls can just check the local tier and verificationExpiry (which safely decays to zero on its own without needing a cross-chain revocation tx), while high-value actions require a fresh proof from the home chain.
We’ve just updated the spec’s Rationale and Security Considerations to document this exact cross-rollup pattern. Really appreciate you calling this out!