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.
Motivation
Autonomous AI agents increasingly interact with smart contracts and decentralized finance (DeFi) protocols. This
presents specific security and coordination challenges:
Identity Fragmentation: AI agents lack standardized identity systems across protocols.
Threat Intelligence Gaps: Exploits and malicious behaviors detected by one protocol are not shared across the
network in real time.
Verification Inconsistencies: No common standard exists to distinguish unverified bots from verified agents.
Cross-Protocol Attack Vectors: Malicious actors can deploy disposable agent addresses to repeat known exploits
against disparate protocols.
This standard addresses these challenges by establishing standardized interfaces for portable agent identity,
verifiable trust scoring, and decentralized threat pattern sharing.
Specification
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.
Definitions
AI Agent: An autonomous or semi-autonomous software system executing on-chain transactions via an Ethereum
address.
Decentralized Identifier (DID): A standardized identifier string formatted as did:agent:<chainId>:<address>.
Verification Tier: A numerical level (0 to 4) representing the verification standard met by the agent:
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)
Reputation Score: An unsigned integer between 0 and 1000 representing trust in basis points (1000 = 100.0%).
Threat Pattern: A bytes32 cryptographic hash identifying a specific anomalous or malicious behavior pattern.
Interfaces
IAgentIdentityRegistry
Compliant identity registry contracts MUST implement the IAgentIdentityRegistry interface:
// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.0;/**
* @title IAgentIdentityRegistry
* @notice Standard interface for AI agent decentralized identity and reputation management.
*/interfaceIAgentIdentityRegistry{structAgentIdentity{stringdid;bytes32publicKey;uint8verificationTier;uint16reputationScore;uint256registrationTime;uint256lastUpdate;stringmetadataURI;boolisActive;uint256totalTransactions;uint256successfulTransactions;}structVerificationTier{stringname;stringrequirements;uint16trustMultiplier;uint256verificationFee;uint256validityPeriod;}eventAgentRegistered(stringindexeddid,addressindexedagentAddress,uint8verificationTier,uint16reputationScore,uint256registrationTime);eventAgentUpdated(stringindexeddid,uint16reputationScore,uint8verificationTier,uint256lastUpdate);eventReputationScoreUpdated(stringindexeddid,uint16oldScore,uint16newScore,stringupdateReason);/**
* @notice Registers a new AI agent identity.
* @dev The caller MUST be authorized to register the corresponding agent address.
* @param did Decentralized identifier following did:agent:<chainId>:<address>.
* @param publicKey Public key associated with the agent.
* @param verificationTier Initial verification tier (0-4).
* @param metadataURI Off-chain metadata URI (e.g. IPFS).
* @return agentId Assigned unique identifier for the registered agent.
*/functionregisterAgent(stringcalldatadid,bytes32publicKey,uint8verificationTier,stringcalldatametadataURI)externalpayablereturns(uint256agentId);/**
* @notice Updates the reputation score for an agent.
* @dev MUST revert if called by an unauthorized address.
* @param agentAddress Address of the agent whose score is being updated.
* @param newScore New reputation score (0-1000).
* @param updateReason Justification string for the score update.
*/functionupdateReputationScore(addressagentAddress,uint16newScore,stringcalldataupdateReason)external;/**
* @notice Updates the verification tier of an agent.
* @dev MUST revert if called by an unauthorized address.
* @param agentAddress Address of the agent.
* @param newTier New tier level (0-4).
*/functionupdateVerificationTier(addressagentAddress,uint8newTier)externalpayable;/**
* @notice Returns the full identity record for a given agent address.
* @param agentAddress Address of the agent.
* @return AgentIdentity struct containing stored registration data.
*/functiongetAgentIdentity(addressagentAddress)externalviewreturns(AgentIdentitymemory);/**
* @notice Resolves an agent address from its DID string.
* @param did Decentralized identifier string.
* @return Address of the corresponding agent.
*/functiongetAgentByDID(stringcalldatadid)externalviewreturns(address);/**
* @notice Queries whether an agent is verified (verificationTier > 0).
* @param agentAddress Address of the agent.
* @return True if the agent holds a verification tier above 0.
*/functionisVerified(addressagentAddress)externalviewreturns(bool);/**
* @notice Computes an effective trust score for an agent combining reputation and tier.
* @param agentAddress Address of the agent.
* @return Effective score between 0 and 1000.
*/functioncalculateTrustScore(addressagentAddress)externalviewreturns(uint16);}
IThreatRegistry
Compliant threat intelligence registries MUST implement the IThreatRegistry interface:
// SPDX-License-Identifier: CC0-1.0
pragmasolidity^0.8.0;/**
* @title IThreatRegistry
* @notice Standard interface for sharing malicious agent patterns and incident reports.
*/interfaceIThreatRegistry{structAttackRecord{addressagentAddress;bytes32patternHash;uint256amountUSDC6;uint256riskMilli;uint8layer;uint256blockedAt;}eventAttackBlocked(uint256indexedidx,addressindexedagent,bytes32indexedpattern,uint256amountUSDC6,uint256riskMilli,uint8layer);eventThreatPatternShared(bytes32indexedpattern,addressindexedreporter,uint256riskScore,stringdescription);/**
* @notice Records an intercepted attack or unauthorized exploit attempt.
* @dev MUST revert if called by an unauthorized address.
* @param agent Malicious agent address.
* @param pattern Behavioral pattern hash.
* @param amountUSDC6 Associated transaction volume in 6-decimal units.
* @param riskMilli Calculated risk score scaled by 1000 (0-1000).
* @param layer Identified attack vector category (1-4).
*/functionrecordAttack(addressagent,bytes32pattern,uint256amountUSDC6,uint256riskMilli,uint8layer)external;/**
* @notice Publishes a recognized threat pattern for cross-protocol intelligence sharing.
* @param pattern Cryptographic hash of the observed threat topology.
* @param riskScore Associated severity rating (0-1000).
* @param description Brief description of the threat vector.
*/functionshareThreatPattern(bytes32pattern,uint256riskScore,stringcalldatadescription)external;/**
* @notice Checks whether an address is recorded as a known attacker.
* @param agent Address to check.
* @return True if recorded incidents exist for this address.
*/functionisKnownAttacker(addressagent)externalviewreturns(bool);/**
* @notice Retrieves the historical attack frequency and blocked volume for an agent.
* @param agent Address to query.
* @return attackCount Total number of recorded attack events.
* @return totalBlocked Cumulative value blocked across incidents.
*/functiongetAgentAttackHistory(addressagent)externalviewreturns(uint256attackCount,uint256totalBlocked);/**
* @notice Evaluates potential transaction risk against recorded threat patterns.
* @param agent Address initiating the transaction.
* @param amount Transaction amount.
* @param action Identifier of the attempted interaction.
* @return Computed threat risk score (0-1000).
*/functionassessTransactionRisk(addressagent,uint256amount,bytes32action)externalviewreturns(uint256);}
IRiskAssessment (Optional)
Registries supporting pre-execution transaction risk assessment MAY implement IRiskAssessment:
The registerAgent function MUST revert if the supplied did is empty or already registered to a different
address.
The contract MUST emit an AgentRegistered event upon successful creation of an identity.
Implementations MUST initialize new agent identities with reputationScore = 500 (representing baseline neutral
standing) unless specified otherwise by local governance.
Reputation Management:
The updateReputationScore function MUST only be callable by authorized entities (such as designated oracle
addresses, audited verification contracts, or governance multi-signatures).
If an unauthorized address calls updateReputationScore, the implementation MUST revert.
The newScore argument MUST NOT exceed 1000. Values above 1000 MUST cause the transaction to revert.
On successful update, the contract MUST emit a ReputationScoreUpdated event.
Threat Reporting:
The recordAttack function MUST only be callable by authorized security oracles, monitoring contracts, or
whitelisted protocol adapters.
If an unauthorized address calls recordAttack, the call MUST revert.
Implementations MUST persist the attack record and increment the agent’s incident counter.
The implementation MUST emit an AttackBlocked event.
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.
Separation of Identity and Threat Registries
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.
Standardized DID Format
Adopting the generic scheme did:agent:<chainId>:<address> ensures cross-chain compatibility without binding the
standard to any proprietary vendor namespace.
Backwards Compatibility
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.
The integrity of this standard relies heavily on restricting access to state-modifying functions:
Reputation Manipulation: If 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.
Denial-of-Service via Malicious Threat Reporting: If 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.
Sybil Resistance and Tier Thresholds
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.
Stale Reputation Risk
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.
Replay and Front-Running Attacks
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.