Building a Proof Gatekeeper for zkVerify Agent Games

Résumé

Pixel shares a deep dive into building a Proof Gatekeeper agent for zkVerify Agent Games, where agents must approve or reject transfers and prove their decisions with Groth16 zero-knowledge proofs. The announcement explains the task protocol, scoring rules, and how verifiable computation can make AI competition results more trustworthy.

DEV Community

Don't Trust the Agent, Verify the Proof: Building a Proof Gatekeeper for zkVerify's Agent Games

Every AI agent competition has the same weak point: the scoreboard has to believe the agents. An agent says "I checked the condition and the answer is yes" — and unless someone re-runs the work, that claim is just a claim. zkVerify exists to remove that leap of faith. It's a blockchain built for one job: verifying zero-knowledge proofs quickly and cheaply, so that "I did the computation correctly" stops being a promise and becomes something anyone can check. You prove the work was done right without revealing anything beyond the result itself. Agent Games is zkVerify's Season 01 tournament for autonomous agents: four tracks, 400,000 VFY in prizes, and every result backed by verifiable proofs. I entered the Proof Gatekeeper track with an agent called mangkarones-gatekeeper. This is a deep dive into how it works — the protocol, the traps, the cryptography, and the bugs — written for anyone thinking of building a verifiable agent themselves. The game: decide, then prove it In Proof Gatekeeper, the platform sends your agent a signed task envelope over HTTP. Each task describes a transfer guarded by a condition: a registered verification key, a minimum balance threshold, an expiry block, an intended recipient, a maximum transfer amount, and the actual values someone is presenting — a proof key, a public balance, the current block, a recipient, an amount, and a proof transaction reference. Your agent has to answer APPROVE or REJECT — and attach a Groth16 zero-knowledge proof that the decision was computed correctly from exactly those inputs. The platform verifies the proof (this is where zkVerify's verification layer comes in) instead of trusting the answer. Scoring is asymmetric on purpose: a correct decision earns +12, a wrong APPROVE costs −6, a wrong REJECT costs −3, and a timeout or missing proof costs −2, with a small reliability bonus on top. Letting a bad transfer through is punished twice as hard as blocking a good one, which shapes the whole design: when in doubt, the safe answer is REJECT. The seven traps The decision logic is a checklist of seven checks, run in a fixed order — the first failing check determines the rejection reason: VK_SUBSTITUTION — the presented proof key (proof_vk) doesn't match the registered key (registered_vk). A proof produced under a different verification key proves something, but not about this gatekeeper. This is the most fundamental check, so it goes first. PROOF_REUSED — the same proof_tx shows up under a different task ID. That's a replay: yesterday's valid proof recycled for today's task. One subtlety matters here — a retry of the same task with the same proof reference is not reuse, because networks and platforms retry deliveries. We track proof references in memory, keyed to the task that first used them. THRESHOLD_MISMATCH — the public balance is below the required minimum. The boundary is inclusive: a balance exactly equal to the minimum is valid. EXPIRED_CONDITION — the current block has reached the expiry block. Here the boundary flips: current_block >= expiry_block means expired, so equality is a rejection. This asymmetry with the threshold check is deliberate, and it's exactly the kind of off-by-one that costs points if you implement from vibes instead of from the spec. RECIPIENT_MISMATCH — the transfer's recipient differs from the condition's recipient, compared case-insensitively (addresses shouldn't fail on capitalisation). AMOUNT_OVERFLOW — the amount exceeds the maximum transfer. Again inclusive: an amount exactly at the cap is valid. VALID_CONDITION — everything passed, so APPROVE. The ordering isn't cosmetic. A substituted key should be reported as a key problem, not masked by a downstream threshold failure. But there's a harder constraint underneath: the circuit enforces the same evaluation. The ZK circuit takes the decision as an input and checks it against its own computation of the condition. If my JavaScript checklist and the circuit ever disagree, witness generatio...
Building a Proof Gatekeeper for zkVerify Agent Games
Powered by Readybot.io

Les dernières actus de Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …