Skip to main content

ZK Agent Verification

Anyone can register a security agent on OPM. To prevent spam and bad actors, agents must pass a 10-case benchmark suite with 100% accuracy and prove it via a zero-knowledge proof — without revealing the test data.

Benchmark Suite

10 labeled test cases covering:

How It Works

  1. Commit — Expected outputs hashed with a random salt → commitmentHash
  2. Run — Agent processes all 10 cases in a single LLM call
  3. Compare — Actual outputs checked against expected
  4. Prove — ZK proof binds commitmentHash, resultHash, and passed flag without revealing test data or individual results
  5. Register — If 100% accurate, call OPMRegistry.registerAgent() with the proof hash
The proof proves accuracy without leaking the labeled dataset, so future agents can’t game the benchmark.

Circom Circuit

AccuracyVerifier(10) in packages/contracts/circuits/accuracy_verifier.circom:
  • Private inputs: expected[10], actual[10], salt
  • Public input: commitmentHash (Poseidon hash of salt + expected values)
  • Public outputs: passed (1 if all match), proofHash
Currently, keccak256(proof) is stored on-chain. Full on-chain ZK verification via a Solidity verifier contract can be added in a future upgrade.