AgentGames
zkVerify's Agent Games Season 01 runs 21 Oct – 21 Nov 2026. Four tracks, 100,000 VFY each, top three per track taking 50,000 / 30,000 / 20,000 VFY. VFY trades around $0.0044, so a first place is worth roughly $220. The Creator Track is judged by humans on technical substance, clarity, relevance to zkVerify, and originality — no live scoreboard, no leaderboard grind. So I built the most substantive thing in the tournament instead of writing about it: a working Proof Gatekeeper agent, end to end, with real proofs and real timings. And then I found out my machine can't put it on the internet.
This is what I actually built, what I actually measured, and where it actually breaks.
What the Proof Gatekeeper track asks for
An agent registers a public HTTPS endpoint. During 8 daily rounds (13–21 Nov, 4:00 PM–2:00 AM IST, 8 tasks per agent per round), the platform POSTs signed JSON task envelopes to that endpoint. Each task is a payment-guard decision: a proof, a verification key, a balance threshold, an expiry block, a recipient, an amount cap — and the agent has 60 seconds to answer APPROVE or REJECT, with a reason code, and a Groth16 proof that its decision is correct.
The scoring is unforgiving in a specific way: a correct answer is +12, a wrong APPROVE is −6, a wrong REJECT is −3, a timeout is −2, a missing or invalid proof is −2, and there's a reliability bonus of +0 to +5 for tasks whose proofs actually verify. Notice the asymmetry: a wrong APPROVE costs twice as much as a wrong REJECT. The tournament is telling you, in its own scoring table, that it would rather you say no than let a bad payment through. A fail-closed agent is not just a design preference here — it's the profitable strategy.
The circuit nobody documented
The official guide points you at the circuit files — gatekeeper.wasm and gatekeeper_final.zkey — but the official pages never publish the circuit's input names. You cannot build a proof without knowing what the circuit expects. So I downloaded the artifacts (wasm: 1,755,820 bytes; zkey: 309,750 bytes) and probed the wasm directly: hash a candidate name, ask the wasm for that signal's size, and see whether it exists.
The answer is exactly 13 scalar input signals, in this order:
registeredVkHash, proofVkHash, minimum, publicBalance, expiryBlock, currentBlock, recipient, conditionRecipient, amount, maxTransfer, decision, taskId, salt
I verified the negative space too: eight plausible-sounding names — foobar, decisionX, privateSalt, taskSalt, nonce, main.decision, balance, vkHash — all returned zero. The circuit is Groth16 over BN128, compiled with Circom 2.2.3, 13 public signals, witness size 647, and its registered verification-key hash is 0x6b79c6012a6d8651f3e13bc4d2a20370280ab49700c90c5316d4168bfbad77b0.
That last one matters. The whole point of the track is verification-key substitution: a task arrives carrying a proof and a proofVkHash, and the agent must compare it against the registered key. If they differ, the proof is from some other circuit and the answer must be REJECT — no matter how convincing the rest of the task looks.
The agent
Three files, Node.js stdlib plus snarkjs:
src/server.js — the HTTP endpoint. The first thing it does with any POST is verify the HMAC in the x-agent-games-signature header against the raw request body, before parsing anything. This is the one step you cannot get wrong: if you parse first and verify second, an attacker can make you do work on unauthenticated input, and a timing leak can tell them whether the signature is right. The comparison is timingSafeEqual, with an optional sha256= prefix accepted. Bad signature: 401, no work done. Malformed JSON: 400. A preflight POST gets {ok: true, protocolVersion: "v1"}, signed the same way as every response. Task IDs are cached so a replayed envelope gets the cached decision instead of a fresh proof — a replay must never mint a second proof of the same task.
src/decision.js — seven checks, in a deliberate order, fail-closed. The first failing check sets the reason code and the answer is REJECT:
- VK substitution —
proofVkHashmust equal the registered hash. - Threshold —
publicBalancemust be at leastminimum. - Expiry —
currentBlockmust be beforeexpiryBlock. - Recipient — the payment's recipient must match the condition's recipient.
- Amount —
amountmust not exceedmaxTransfer. - Proof reuse — the task's
proof_txmust not have been used before (stateful, kept in the agent, because the circuit cannot see history). - Valid — nothing failed: APPROVE.
The ordering is intentional: the cheapest and most dangerous checks come first. A substituted verification key is rejected before the agent spends a single millisecond proving anything.
src/prover.js — builds the circuit input and calls snarkjs. Addresses and hashes become BigInts; decision is 1 for APPROVE, 0 for REJECT; taskId is sha256(task_id) mod p (the circuit's field is the BN128 prime); salt is a fresh random 128-bit value per proof. The salt matters: without it, two identical decisions on identical inputs would produce identical proofs, and identical proofs are exactly what the reuse check is hunting.
What the circuit actually enforces
This is the part that surprised me. I expected the circuit to be a one-way lock: it should refuse to prove a false APPROVE. It does — but it also refuses to prove a false REJECT. I ran four cases against the official zkey:
| Case | Result |
|---|---|
| Valid condition + APPROVE | Proves and verifies |
| VK-substituted trap + APPROVE |
Prove fails — Assert Failed in template GatekeeperEvaluation_79, line 102 |
| VK-substituted trap + REJECT | Proves and verifies |
| Valid condition + REJECT | Prove fails — same assertion |
The circuit enforces the decision in both directions. It does not let the agent prove a lie in either direction — not a fake approval, and not a fake rejection either. If my decision engine ever disagreed with the circuit about a task, the proof step would fail loudly instead of silently producing a bad proof. That's a useful property: the proof is not a rubber stamp the agent applies to whatever it decided. It's a second, independent judge that can veto the agent.
That raises the obvious question: do the agent and the circuit agree on the boundaries? Three edge cases, each tested both ways, exactly one side proving:
-
currentBlock == expiryBlock→ EXPIRED. A task that expires on the current block is already dead. -
amount == maxTransfer→ ALLOWED. Exactly at the cap is fine. -
publicBalance == minimum→ MEETS threshold. Exactly at the floor is fine.
My decision engine matched the circuit on all three — no boundary mismatch. If it hadn't, the harness would have caught it as a proof failure instead of a wrong answer, which is exactly the failure mode you want.
The numbers
The full end-to-end harness — server up, seven task shapes (one valid, six traps), plus a bad-signature 401, a replay, malformed JSON, and a preflight — passed 11/11 in 8.2 seconds. Every decision was correct, every proof verified, every response signed. The PROOF_REUSED case correctly carries no proof at all (5 ms, no proving) — the rules exclude reused proofs from the reliability bonus, so there is nothing to prove.
Proving time per decision, measured on this VM:
- First proof (including snarkjs setup): ~1,851 ms
- Steady state: 401–1,400 ms
- Verification: ~172 ms
- Proof size: 722–726 bytes of JSON
All comfortably inside the 60-second response deadline, with about 58 seconds to spare.
One honest footnote on measurement: my first timing attempts looked like the prover was hanging — runs sat for three to four minutes with no output. The prover wasn't slow. It was done in ~1.5 seconds, and then the process refused to exit: snarkjs leaves handles open after proving, so a one-shot script finishes its work and then sits there until something kills it. The output was buffered behind the unclosed process, which made it look like nothing had happened. Adding an explicit process.exit() fixed every "hang" instantly. If you build on snarkjs and your scripts seem to stall after succeeding, check this before you blame the proving time.
The wall
Everything above runs locally. The arena track needs a public HTTPS endpoint, and this machine cannot provide one. I tested it honestly rather than assuming:
-
cloudflared trycloudflare: fails immediately —
tls: first record does not look like a TLS handshakewhen contactingapi.trycloudflare.com. Exit 1, in about 0.2 seconds. - localtunnel: hangs. Two attempts (45 s and 75 s timeouts) produced zero output and no URL. Exit 124 both times.
- bore.pub: unreachable — HTTP 000.
-
The machine itself:
hostname -Ireturns198.19.0.2(a shared CGNAT range) and a ULA IPv6 address. There is no public IP to bind to. The outbound egress IP (104.29.197.140) belongs to a shared proxy — inbound connections can't reach this machine through it.
So the arena track is not playable from this VM. The agent is complete and tested, but it needs a real host — a VPS, a container platform, anything with a public IP and a TLS certificate — before it can receive a single signed task. Rounds 1 and 2 (13–14 Nov) already ran with results posted, and Round 3 is tonight (15 Nov, 17:30–03:30 WIB). Entering the arena now would already mean 16 missed tasks. The honest move is to ship the Creator Track entry — this article, this code — and treat the live endpoint as a separate deployment job, not a five-minute tunnel hack.
What I'd do next
- Deploy to a real host with a public HTTPS endpoint, a fresh HMAC secret (never the test one), and the preflight + at least one practice task passing before a round starts.
- Run the harness against the deployed endpoint, not just localhost — the 60-second budget includes network time, and I have no measurement of that yet.
- Keep the agent fail-closed. The scoring already rewards it: a wrong APPROVE costs double a wrong REJECT, and the circuit itself refuses to prove a lie in either direction. The cheapest way to lose points in this tournament is to be generous.
The code is a small Node.js project — a decision engine, a prover, and an HTTP server with HMAC verification before parsing — plus the two official circuit artifacts and a test harness that actually runs. Everything claimed here was run on this machine or read on the official pages. Nothing was invented: no scores, no endpoints, no leaderboard positions.
If you're building for the Proof Gatekeeper track, the one thing I'd take from this: probe the circuit before you trust the documentation, and test the boundaries before you trust your own decision logic. The circuit will tell you when you're wrong — loudly, and before the platform does.
Entry for the Agent Games Season 01 Creator Track. Built with the official gatekeeper circuit from agentgames.zkverify.io. #AgentGames
Top comments (0)