Skip to content

Start typing to search the documentation.

ERC-8004 and Proof-of-Human

On this page

Self Agent ID is a reference implementation of ERC-8004 plus a proposed optional Proof-of-Human extension. To read the registry from a contract now, see Gating smart contracts.

What is ERC-8004?

ERC-8004 is a proposed standard for on-chain AI agent registries. It defines a minimal interface for registering agents, giving them unique IDs (as NFTs) and looking up who owns them.

The base standard does not specify how agents are verified or who operates them. Optional extensions fill that gap, the same way ERC-721 defines optional Metadata and Enumerable extensions within one EIP.

Self’s SelfAgentRegistry implements the base surface: the register() overloads, setAgentURI, key-value metadata and agent-wallet binding. See Smart contracts for the deployed interface.

Why a Proof-of-Human extension

ERC-8004 registers agents but can’t tell whether a real, unique human operates one. Without that, anyone can register unlimited agents for sybil attacks, bot farms and impersonation, and every protocol that gates on “verified agents” has to build its own check.

Design principles

The proposed IERC8004ProofOfHuman extension inherits from IERC8004 and adds only proof-of-human registration, revocation and query functions.

  • Provider-agnostic. Any ZK identity system (Self Protocol, World ID, Humanity Protocol) can implement IHumanProofProvider. The registry does not depend on how humanity is proven.
  • Sybil-resistant. Each human produces a unique, scoped nullifier. The registry tracks agent counts per nullifier, and services choose their own limits (1, N or unlimited).
  • Privacy-preserving. The proof stores a nullifier, not an identity: no passport data or biometrics. Credentials such as age or nationality are stored only when the human chooses to disclose them.

The extension interface

/// @title IERC8004ProofOfHuman
/// @notice Optional extension to ERC-8004 adding proof-of-human verification
interface IERC8004ProofOfHuman is IERC8004 {
    // ── Registration ──────────────────────────────
    function registerWithHumanProof(
        string calldata agentURI,
        address proofProvider,
        bytes calldata proof,
        bytes calldata providerData
    ) external returns (uint256 agentId);

    function revokeHumanProof(
        uint256 agentId,
        address proofProvider,
        bytes calldata proof,
        bytes calldata providerData
    ) external;

    // ── Verification (read by any service/contract) ─
    function hasHumanProof(uint256 agentId) external view returns (bool);
    function proofExpiresAt(uint256 agentId) external view returns (uint256);
    function isProofFresh(uint256 agentId) external view returns (bool);
    function getHumanNullifier(uint256 agentId) external view returns (uint256);
    function getProofProvider(uint256 agentId) external view returns (address);
    function isApprovedProvider(address provider) external view returns (bool);

    // ── Sybil detection ───────────────────────────
    function getAgentCountForHuman(uint256 nullifier) external view returns (uint256);
    function getAgentsForNullifier(uint256 nullifier) external view returns (uint256[] memory);
    function getAgentsForNullifier(uint256 nullifier, uint256 offset, uint256 limit)
        external view returns (uint256[] memory);
    function sameHuman(uint256 agentIdA, uint256 agentIdB) external view returns (bool);

    // Events and errors omitted: see contracts/src/interfaces/IERC8004ProofOfHuman.sol
}

The provider interface

/// @title IHumanProofProvider
/// @notice Pluggable identity backend for proof-of-human
interface IHumanProofProvider {
    /// @notice Verify a ZK proof and return (success, nullifier).
    /// @dev The nullifier is deterministic: same human + same scope
    ///      always produces the same nullifier.
    function verifyHumanProof(
        bytes calldata proof,
        bytes calldata data
    ) external returns (bool verified, uint256 nullifier);

    /// @notice Short provider name (Self's provider returns "self").
    function providerName() external view returns (string memory);

    /// @notice Verification strength score (0-100).
    function verificationStrength() external view returns (uint8);
}

Self’s SelfHumanProofProvider implements this interface on top of Self Protocol’s Identity Verification Hub V2.

Key concepts

Nullifier: a scoped, opaque identifier unique per (human, service) pair, derived by the proof provider from the document. Two agents with the same nullifier belong to the same human. The nullifier is stored on-chain; the document data is not. Nullifiers for different services can’t be linked.

Proof provider: an approved contract that verifies proofs and reports a nullifier and a strength. The registry keeps an allowlist (isApprovedProvider). Verifiers should require Self’s provider unless they intend to accept others.

maxAgentsPerHuman: a registry-level cap on how many agents one human can hold at once. The deployed registry allows 10 on Celo Mainnet and has no cap (0) on Celo Sepolia. Services set their own limit on top (the SDK verifier’s default is 1). Revoking an agent frees the slot.

proofExpiresAt: the proof’s expiry, min(document expiry, registration time + maxProofAge), where maxProofAge defaults to 365 days. It is set when the proof is recorded and checked on-chain by isProofFresh(), with no oracle. A proof refresh moves it forward for the same agent ID.

Verified means hasHumanProof && isProofFresh. hasHumanProof() (and isVerifiedAgent(agentKey)) stay true after the proof expires, so an on-chain gate must also check isProofFresh(getAgentId(agentKey)).

Verification strength

verificationStrength() returns a score from 0 to 100 for how strongly the proof binds a human identity. The SDK maps the score to a label with getProviderLabel(strength):

ScoreSDK label
≥ 100passport
≥ 80kyc
≥ 60govt_id
≥ 40liveness
< 40unknown

Self’s provider reports 100 (passport). The /api/reputation and /api/verify-status endpoints return this score and label. It is separate from the Reputation Registry’s document-type weights.

The three ERC-8004 registries

ERC-8004 defines three registry roles, and Self Agent ID implements all three on-chain:

  • Identity: SelfAgentRegistry. Agent NFTs, human proofs, ZK-attested credentials and metadata (the registration document at agentURI).
  • Reputation: SelfReputationRegistry. Client feedback plus proof-of-human feedback weighted by document type.
  • Validation: SelfValidationRegistry. Validation requests and responses from third parties, plus on-chain freshness validations.

See Smart contracts for the feedback, validation and gating APIs.

Agent documents are also A2A Agent Cards

The ERC-8004 registration document at agentURI can also be a valid A2A Agent Card: add url, version, provider, capabilities and securitySchemes, with no separate registration step. See Agent registration JSON.

Status and source

IERC8004ProofOfHuman is a draft extension for discussion on Ethereum Magicians: EIP draft. This deployment is its reference implementation. It uses UUPS upgradeable proxies, but the interfaces don’t depend on a proxy pattern. Addresses: Smart contracts. Source: github.com/selfxyz/self-agent-id.

Next

Was this page helpful?