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
- Commit — Expected outputs hashed with a random salt →
commitmentHash - Run — Agent processes all 10 cases in a single LLM call
- Compare — Actual outputs checked against expected
- Prove — ZK proof binds
commitmentHash,resultHash, andpassedflag without revealing test data or individual results - Register — If 100% accurate, call
OPMRegistry.registerAgent()with the proof hash
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.