This standard defines an on-chain framework for decentralized identity (DID) management, reputation scoring, and threat intelligence sharing for autonomous AI agents operating across Ethereum protocols. The specification defines interfaces for agent identity registration, multi-tier verification status, reputation tracking, and collaborative threat reporting.
Autonomous AI agents increasingly interact with smart contracts and decentralized finance (DeFi) protocols. This presents specific security and coordination challenges:
This standard addresses these challenges by establishing standardized interfaces for portable agent identity, verifiable trust scoring, and decentralized threat pattern sharing.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
did:agent:<chainId>:<address>.0: None (unverified default)1: Bronze (basic identity confirmation)2: Silver (extended verification and operator attestation)3: Gold (comprehensive verification and collateral bond)4: Platinum (independently audited system and continuous monitoring)bytes32 cryptographic hash identifying a specific anomalous or malicious behavior pattern.IAgentIdentityRegistryCompliant identity registry contracts MUST implement the IAgentIdentityRegistry interface:
IThreatRegistryCompliant threat intelligence registries MUST implement the IThreatRegistry interface:
IRiskAssessment (Optional)Registries supporting pre-execution transaction risk assessment MAY implement IRiskAssessment:
Agent Registration:
registerAgent function MUST revert if the supplied did is empty or already registered to a different
address.verificationTier = 0 (unverified default) with verificationExpiry = 0.
registerAgent MUST NOT accept a non-zero tier parameter; promotion to a verified tier (1–4) MUST occur through
a distinct invocation of updateVerificationTier by an authorized verifier.AgentRegistered event upon successful creation of an identity.reputationScore = 500 (representing baseline neutral
standing) unless specified otherwise by local governance.Verification Tier Lifecycle & Expiration:
updateVerificationTier by authorized
verifiers, audited verification contracts, or governance.updateVerificationTier MUST set verificationExpiry = block.timestamp + validityPeriod.getEffectiveTier view function MUST evaluate active status and the validity period: if the agent
is inactive (!isActive) OR if block.timestamp > verificationExpiry, the function MUST return 0
regardless of the stored verificationTier.isVerified MUST return true if and only if the agent is active (isActive == true) AND
getEffectiveTier(agentAddress) > 0. Inactive or expired verifications MUST evaluate to false without
requiring an explicit on-chain downgrade transaction.updateReputationScore) or general activity (lastUpdate) MUST NOT renew or extend
verificationExpiry. Conforming to the Identity/Reputation Boundary (T5), verification renewal MUST require an
independent verification action by an authorized verifier.Reputation Management:
updateReputationScore function MUST only be callable by authorized entities (such as designated oracle
addresses, audited verification contracts, or governance multi-signatures).updateReputationScore, the implementation MUST revert.newScore argument MUST NOT exceed 1000. Values above 1000 MUST cause the transaction to revert.ReputationScoreUpdated event.calculateTrustScore function MUST return 0 if the agent is inactive (!isActive). For active agents,
it MUST derive any tier-based weighting from getEffectiveTier(agentAddress) rather than reading stored
verificationTier directly.Threat Reporting & Incident Lifecycle:
recordAttack function MUST only be callable by authorized security oracles, monitoring contracts, or
whitelisted protocol adapters.recordAttack, the call MUST revert.status = IncidentStatus.ACTIVE, assign a unique
incidentId, and increment the agent's active incident counter.AttackBlocked event.retractAttack MUST only be callable by the original reporting entity or authorized governance to remediate
false-positive findings. When called on an ACTIVE incident, it transitions the record to IncidentStatus.RETRACTED,
emits AttackRetracted, and decrements the agent's active incident counter.resolveAttack MUST NOT be callable by the subject agent. It MUST require authorized verifier, auditor, or
governance attestation verifying that the exploit vulnerability has been remediated. It transitions the record
to IncidentStatus.RESOLVED, emits AttackResolved, and decrements the agent's active incident counter.isKnownAttacker (and hasActiveThreat) MUST return true if and only if the agent has at least one incident with
status == IncidentStatus.ACTIVE.ACTIVE state.Threat Pattern Derivation:
Threat patterns MUST be derived using keccak256 hashing of the interaction parameters:
Ethereum smart contracts lack native floating-point math. Using an integer scale of 0 to 1000 provides fine-grained reputation measurement (0.1% resolution) without incurring fixed-point arithmetic overhead in consuming DeFi protocols.
Decoupling IAgentIdentityRegistry from IThreatRegistry allows protocols to adopt identity management without
mandating a specific threat database, and vice versa. It also enables modular upgrades where threat detection oracles
can evolve independently of long-lived identity attestations.
Adopting the generic scheme did:agent:<chainId>:<address> ensures cross-chain compatibility without binding the
standard to any proprietary vendor namespace.
This standard introduces new interfaces and does not conflict with existing token standards or registries. Protocols can integrate conformant registries alongside existing access-control modules without breaking changes.
An executable Foundry test package covers the T5/T8 verification-expiry checks. It advances time, compares expired and unverified agents with equal reputation, and covers the exact expiry boundary. The included registry is a test fixture; the same checks can be adapted to an implementation.
The integrity of this standard relies heavily on restricting access to state-modifying functions:
updateReputationScore is left unprotected or guarded by an easily compromised key,
an adversary could inflate the reputation score of malicious agents to bypass protocol limits, or defame competitor
agents by setting their score to zero. Registries MUST implement strict access control, such as multi-signature
governance, timelocks, or decentralized consensus among multiple independent reporting nodes.recordAttack is publicly callable without verification or
stake, an attacker could falsely label benign addresses as known attackers, causing integrated protocols to block
legitimate users. Registries MUST restrict this function to authenticated monitors or require bonded stakes that are
slashed upon fraudulent reports.Allowing identity registrants to self-select verification tiers creates an immediate privilege-escalation vector where
unverified bots claim false trust guarantees. Restricting registerAgent to tier 0 enforces an essential separation of
privileges: permission to register an identity is permissionless or identity-gated, whereas issuing a verification tier
requires specific attestation authority.
Furthermore, static tier records without time bounds permit stale certifications to persist indefinitely if an agent
is abandoned or repurposed. Enforcing an explicit verificationExpiry evaluated dynamically in getEffectiveTier and
isVerified guarantees that verification status reflects current, active attestations without relying on off-chain
parties to trigger costly manual downgrade transactions. In line with the identity/reputation boundary, reputation score
updates MUST NOT modify verificationExpiry.
Implementations MUST apply this expiry consistently across all tier-dependent outputs. Specifically,
calculateTrustScore MUST derive any tier-based weighting from getEffectiveTier(agentAddress) rather than reading
AgentIdentity.verificationTier directly. After a verification expires, the agent MUST lose any multiplier associated
with that tier (e.g., a Gold multiplier for tier 3) even though the stored verificationTier field retains its value.
The agent's reputationScore field is unaffected; only the tier contribution to the trust score is zeroed. This ensures
that calculateTrustScore is consistent with isVerified and that consumers cannot inadvertently retain the benefit of
an expired certification simply by reading a stale field (conformance test T8).
Because Ethereum accounts can be generated at negligible cost, malicious actors can create arbitrary numbers of tier 0 (unverified) agent identities. Consuming protocols SHOULD NOT grant permissions, borrowing capacity, or reduced collateral requirements to agents based solely on tier 0 registration. High-trust operations SHOULD require verification tier 2 (Silver) or higher and evaluate historical transaction depth.
An agent with historically high reputation can become compromised or undergo an intentional malicious exit strategy.
Protocols consuming IAgentIdentityRegistry SHOULD inspect the lastUpdate timestamp and reject evaluations whose
attestations exceed an acceptable staleness window.
When transaction risk evaluations or threat pattern hashes are broadcast to the public mempool, malicious agents could monitor incoming reports and attempt to front-run blocking transactions. Implementations SHOULD use private mempools, commit-reveal schemes, or batch updates when reporting critical threat incidents.
Without an explicit incident lifecycle, false positives recorded by authorized oracles result in permanent, un-remediable
denial-of-service for benign agents across all integrating DeFi protocols. Defining independent state transitions
(ACTIVE -> RETRACTED and ACTIVE -> RESOLVED) guarantees that:
hasActiveThreat
(active > 0), whereas institutional risk modules can query getIncidentSummary to enforce strict zero-tolerance
policies (active > 0 || resolved > 0).Identity resolution and reputation assessment MUST remain semantically distinguishable, even when implemented in the same contract or storage structure:
Conformance cases (boundary properties only; "unsupported" is an acceptable explicit answer, and unimplemented capabilities MUST NOT be marked PASS):
calculateTrustScore called after expiry MUST return a score with zero tier contribution, identical to calling it on
an agent with the same reputationScore but verificationTier == 0.These requirements do not mandate separate contracts, prohibit combined reads, or prescribe a storage layout. Identity/ reputation separation as a concept has prior art (ERC-8004 separates Identity, Reputation and Validation registries; W3C DID Core); this section claims only the specific constraints and test cases above.
Copyright and related rights waived via CC0.