<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lince Lesta</title>
    <description>The latest articles on DEV Community by Lince Lesta (@lince00).</description>
    <link>https://dev.to/lince00</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4246688%2F0b74be76-9f24-4a1a-b532-288b4936510e.jpg</url>
      <title>DEV Community: Lince Lesta</title>
      <link>https://dev.to/lince00</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lince00"/>
    <language>en</language>
    <item>
      <title>80 to 314 in Four Rounds: What Proof Gatekeeper Learned in the Agent Games</title>
      <dc:creator>Lince Lesta</dc:creator>
      <pubDate>Fri, 20 Nov 2026 17:33:46 +0000</pubDate>
      <link>https://dev.to/lince00/80-to-314-in-four-rounds-what-proof-gatekeeper-learned-in-the-agent-games-1j1m</link>
      <guid>https://dev.to/lince00/80-to-314-in-four-rounds-what-proof-gatekeeper-learned-in-the-agent-games-1j1m</guid>
      <description>&lt;p&gt;&lt;em&gt;Creator Track build log — Agent Games Season 01, by Lince (@XL_coin). Part 3 of the Proof Gatekeeper story. #AgentGames&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1 built it. Part 2 opened it up. Part 3 is the scoreboard.
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap"&gt;Part 1&lt;/a&gt; I built Proof Gatekeeper — a public endpoint that answers APPROVE or REJECT on proposed payments, with a Groth16 proof of every decision. In &lt;a href="https://dev.to/lince00/inside-proof-gatekeeper-hmac-the-decision-engine-and-232-points-in-three-scored-rounds-2431"&gt;Part 2&lt;/a&gt; I opened it up: the HMAC handshake, the decision engine, the 45-second proving budget. This part answers a different question: what did four scored rounds actually do to the scoreboard — and what did they teach?&lt;/p&gt;

&lt;p&gt;The short version: the agent got better without changing. The code barely moved between rounds. The score did.&lt;/p&gt;

&lt;h2&gt;
  
  
  The scoreboard, round by round
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Round&lt;/th&gt;
&lt;th&gt;Points added&lt;/th&gt;
&lt;th&gt;Total&lt;/th&gt;
&lt;th&gt;Rank&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;04&lt;/td&gt;
&lt;td&gt;+80&lt;/td&gt;
&lt;td&gt;80.0&lt;/td&gt;
&lt;td&gt;#197&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;05&lt;/td&gt;
&lt;td&gt;+70&lt;/td&gt;
&lt;td&gt;150.0&lt;/td&gt;
&lt;td&gt;#223&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;06&lt;/td&gt;
&lt;td&gt;+82&lt;/td&gt;
&lt;td&gt;232.0&lt;/td&gt;
&lt;td&gt;#212&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;07&lt;/td&gt;
&lt;td&gt;+82&lt;/td&gt;
&lt;td&gt;314.0&lt;/td&gt;
&lt;td&gt;#202&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Four scored rounds, 502 agents, and the line goes in one direction: up. Round 07 was tied for our strongest round — +82, the same as Round 06 — and it moved us up ten places, from #212 to #202. Mid-round we sat at 272.0 and #214; the second half added +42.&lt;/p&gt;

&lt;p&gt;The round itself was quiet in the best way. Eight tasks issued, four responded, zero timeouts, uptime 100.0%. Nothing caught fire, nothing needed a fix at 2 a.m. The server answered inside its deadline every time, and the receipts piled up: the live &lt;code&gt;/health&lt;/code&gt; endpoint, checked while writing this part, reports 35 proofs seen and 39 responses cached, HMAC configured, self-test passing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed between rounds? Almost nothing — and that is the lesson
&lt;/h2&gt;

&lt;p&gt;Here is the honest answer to the question every build log eventually faces: what did I improve between Round 04 and Round 07? The checklist from Part 1 barely moved. The decision engine from Part 2 did not change at all. No new circuit, no new strategy, no clever tuning.&lt;/p&gt;

&lt;p&gt;What changed was the scoreboard's opinion of the same behaviour, repeated four times. And that is the real lesson of this competition: it rewards showing up, correctly, every single night, more than it rewards any single clever idea.&lt;/p&gt;

&lt;p&gt;The scoring makes this explicit. A perfect round is 101 points — eight tasks at +12, plus a +5 reliability bonus. The leaders are collecting those: pecker at 580.9, Astrex-1 at 571.4, Bnova GateKeeper at 570.3 after Round 07. They are not winning on cryptography. They are winning on never missing, never timing out, never answering a question they were not asked.&lt;/p&gt;

&lt;p&gt;Our +82 rounds are the same story from the other side. Eight tasks, four answered, and the four that counted were answered right. The gap between +82 and +101 is not a better proof — it is the tasks that never arrived as answerable work in our window. Consistency is the whole game, and it is a game you win by being boring on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  The asymmetry, with four rounds of evidence
&lt;/h2&gt;

&lt;p&gt;Part 2 named the scoring asymmetry: a wrong APPROVE costs −6, a wrong REJECT costs −3. Approving a bad payment is punished twice as hard as rejecting a good one, so fail-closed is not just a principle — it is the optimal strategy under these rules.&lt;/p&gt;

&lt;p&gt;Four rounds later, that is no longer a theory. It is the record. Across Rounds 04–07, Proof Gatekeeper has never handed the platform a proven approval for a payment that should not have happened. Every rejection the engine issued was a rejection the inputs justified — malformed envelope, reused proof, substituted key, threshold, recipient, amount, expiry — in the fixed order Part 2 described. The conservatism that looks cautious from the outside is, under this scoring, arithmetic: when the inputs are ambiguous, reject, take the −3 at worst, and never spend a −6 on a guess.&lt;/p&gt;

&lt;p&gt;This is also why the "boring stack" from Part 1 — plain Node.js, no framework, Railway — matters more than it sounds. The stack did not need to be clever. It needed to be up at 17:30 WIB every night, answer inside 60 seconds, and never improvise. It was.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest gap
&lt;/h2&gt;

&lt;p&gt;The gap to first place is now 266.9 points. Even a perfect final round (+101) would take us to 415.0 — still 165.9 short of pecker's current 580.9, and the leaders will score in Round 08 too. First place is out of reach, and it has been since Round 06. Saying so plainly is part of the log's job.&lt;/p&gt;

&lt;p&gt;So what is left to win? A clean finish. Round 08 is the last round, and the realistic goal is the same one the whole run has had: answer everything that arrives, answer it right, and let the receipts speak. A guard's reputation is not its rank — it is the record of decisions it can prove. Four rounds, zero wrong approvals, zero timeouts, every proof verifiable. That record is the entry.&lt;/p&gt;

&lt;p&gt;One number I am still watching, honestly: the dashboard's Verified Proofs counter. The server's own counters keep climbing — 35 proofs seen as of this writing — but the dashboard counter read 0 on my last check. On-chain verification may simply lag behind the rounds, and I will keep checking it. If it is still 0 after the final round, that is a question worth investigating in its own right, not a footnote to hide. A guard that claims its proofs are verified should be able to show it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Round 08 — the final round — closes at 03:30 WIB on 21 November. Creator Track submissions close 21 November, 22:00 UTC, and judging runs 22–30 November for a 100,000 VFY pool per track, top three only. Whatever the final number is, the work is the same: keep the endpoint up through the last window, answer what arrives, prove what was decided.&lt;/p&gt;

&lt;p&gt;Agents will move money. The question is not whether we trust them, but whether we can stop needing to. Four rounds, 314 points, and a server that cannot lie about having checked — that is one concrete answer. #AgentGames&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Proof Gatekeeper — receipts, not promises. Built for &lt;a href="https://agentgames.zkverify.io" rel="noopener noreferrer"&gt;Agent Games by zkVerify&lt;/a&gt;. Repo: &lt;a href="https://github.com/lince00/agent-games-gatekeeper" rel="noopener noreferrer"&gt;github.com/lince00/agent-games-gatekeeper&lt;/a&gt; · Live endpoint: &lt;a href="https://gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper" rel="noopener noreferrer"&gt;gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper&lt;/a&gt; · Part 1: &lt;a href="https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap"&gt;Receipts, Not Promises: Building a Payment Guard That Proves Every Decision&lt;/a&gt; · Part 2: &lt;a href="https://dev.to/lince00/inside-proof-gatekeeper-hmac-the-decision-engine-and-232-points-in-three-scored-rounds-2431"&gt;Inside Proof Gatekeeper: HMAC, the Decision Engine, and 232 Points in Three Scored Rounds&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>ai</category>
      <category>blockchain</category>
      <category>zeroknowledge</category>
    </item>
    <item>
      <title>Inside Proof Gatekeeper: HMAC, the Decision Engine, and 232 Points in Three Scored Rounds</title>
      <dc:creator>Lince Lesta</dc:creator>
      <pubDate>Thu, 19 Nov 2026 14:17:22 +0000</pubDate>
      <link>https://dev.to/lince00/inside-proof-gatekeeper-hmac-the-decision-engine-and-232-points-in-three-scored-rounds-2431</link>
      <guid>https://dev.to/lince00/inside-proof-gatekeeper-hmac-the-decision-engine-and-232-points-in-three-scored-rounds-2431</guid>
      <description>&lt;p&gt;&lt;em&gt;Creator Track deep-dive — Agent Games Season 01, by Lince (@XL_coin). Part 2 of the Proof Gatekeeper build log. #AgentGames&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part 1 built it. Part 2 opens it up.
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap"&gt;Part 1&lt;/a&gt; I wrote about building Proof Gatekeeper — a public endpoint that answers APPROVE or REJECT on proposed payments, with a Groth16 proof of every decision. The checklist, the 13 nameless circuit signals, the Poseidon commitment, the Railway lesson. That was the build log; this is the inside view.&lt;/p&gt;

&lt;p&gt;This part answers a different question: what actually happens between the platform sending a task and the gatekeeper answering it — and what three scored rounds did to the scoreboard.&lt;/p&gt;

&lt;p&gt;The numbers first, because they are the reason this part exists. After Rounds 04, 05, and 06, Proof Gatekeeper holds &lt;strong&gt;232.0 points&lt;/strong&gt; and sits at &lt;strong&gt;rank #212&lt;/strong&gt; of 495 agents. Round 04 added 80 points with 9 proofs verified; Round 05 added 70; Round 06 added 82. The rank climbed from #229 this time — Round 06 was the strongest round yet — but the leaders keep pulling away (the top two both gained 101 points in Round 05, a perfect round). That is the honest picture, and it is also why the mechanics below matter: in this competition, the difference between a good agent and a great one is not the cryptography. It is the discipline of never answering a question you were not asked, and never approving a payment you did not check.&lt;/p&gt;

&lt;h2&gt;
  
  
  The front door: HMAC before anything else
&lt;/h2&gt;

&lt;p&gt;Every task arrives as a POST to &lt;code&gt;/gatekeeper&lt;/code&gt; with one header: &lt;code&gt;x-agent-games-signature&lt;/code&gt;. Its value is an HMAC-SHA256 of the raw request body, hex-encoded, computed with a secret the platform issued when the agent was registered.&lt;/p&gt;

&lt;p&gt;The first thing the server does is verify that signature — before parsing any JSON, before reading any field. The code is short:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;verifySignature&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rawBody&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headerValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;secret&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="n"&gt;headerValue&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;hmacHex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;secret&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;rawBody&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"utf8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headerValue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toLowerCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"utf8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;timingSafeEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three details in there are doing real work:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Raw body, not parsed JSON.&lt;/strong&gt; The HMAC covers the exact bytes the platform sent. Re-serializing a parsed object would change whitespace and key order, and the signature would never match. This is the kind of thing that fails silently in testing and loudly in production — the preflight handshake is what confirmed the format, because the documentation never spelled out that the digest is lowercase hex.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Constant-time comparison.&lt;/strong&gt; &lt;code&gt;timingSafeEqual&lt;/code&gt; means the check takes the same time whether the first byte is wrong or the last one is. A naive &lt;code&gt;===&lt;/code&gt; leaks, byte by byte, how much of a forged signature is correct. Nobody is going to brute-force a 256-bit HMAC through a timing leak — but the point of a guard is that it does not rely on the attacker being lazy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No secret, no service.&lt;/strong&gt; The secret comes from exactly one place: the &lt;code&gt;AGENT_GAMES_HMAC_SECRET&lt;/code&gt; environment variable, set from the dashboard's Rotate Secret. It is never logged, never committed, never pasted anywhere. If it is missing, the server answers 503 and refuses to judge anything. A guard that answers without its key is not a guard.&lt;/p&gt;

&lt;p&gt;A bad signature gets a 401 and nothing else — no parsing, no decision, no proof. And the authentication is mutual: every response the gatekeeper sends carries its own &lt;code&gt;x-agent-games-signature&lt;/code&gt; over the raw response body, so the platform can verify that the answer came from the registered agent and was not tampered with in transit.&lt;/p&gt;

&lt;p&gt;The same endpoint also handles the preflight handshake — the platform sends &lt;code&gt;{type: "agent-games.preflight.v1", agent_id, issued_at, nonce}&lt;/code&gt; and expects &lt;code&gt;{ok: true, protocolVersion: "v1"}&lt;/code&gt;, signed. Preflight must pass before the agent is marked active. It is the cheapest possible proof that both sides agree on the signature format, and it caught the one format question the docs left open.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision engine: a pure function, in a fixed order
&lt;/h2&gt;

&lt;p&gt;Once the signature checks out, the task is parsed and decided by a pure function. No language model, no judgment calls, no vibes. The checks run in a fixed order, and the first failure decides the outcome:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Malformed envelope&lt;/strong&gt; → REJECT / &lt;code&gt;INVALID_TASK&lt;/code&gt;, with no proof. There is nothing provable about a task that cannot be read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task seen before&lt;/strong&gt; → return the cached response. The task ID is the idempotency key: the platform retries after network failures, and a retry must get the same answer, not a second decision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proof already used by another task&lt;/strong&gt; → REJECT / &lt;code&gt;PROOF_REUSED&lt;/code&gt;, with no proof. A proof is a receipt for exactly one task; reusing it is the oldest trick in the book, and the rules exclude these answers from the proof bonus anyway.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification key substituted&lt;/strong&gt; → REJECT / &lt;code&gt;VK_SUBSTITUTION&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Balance below the minimum&lt;/strong&gt; → REJECT / &lt;code&gt;THRESHOLD_MISMATCH&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recipient mismatch&lt;/strong&gt; → REJECT / &lt;code&gt;RECIPIENT_MISMATCH&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amount above the maximum&lt;/strong&gt; → REJECT / &lt;code&gt;AMOUNT_OVERFLOW&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Condition expired&lt;/strong&gt; → REJECT / &lt;code&gt;EXPIRED_CONDITION&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Otherwise&lt;/strong&gt; → APPROVE / &lt;code&gt;VALID_CONDITION&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The order matters. Idempotency comes before everything, because answering the same task twice is worse than answering it slowly. Proof-reuse comes before the field checks, because a reused proof is invalid no matter what the fields say. And the field checks are all simple comparisons — the whole decision is a handful of them. The expensive part is the proof, and it only starts after the decision is made.&lt;/p&gt;

&lt;p&gt;Two encoding details are worth naming, because they are the kind of thing that breaks silently. The 256-bit verification-key hashes are reduced modulo the bn128 field prime before they enter the circuit — the registered key hash itself is larger than the prime, so the reduced value is what appears in the public signals. And the task ID string becomes a field element from its raw UTF-8 bytes. Neither encoding is documented anywhere; both were confirmed the only way that counts, by a practice proof the platform accepted.&lt;/p&gt;

&lt;p&gt;Then there is the salt: a fresh random 128-bit value per proof, private, never logged, never returned. It feeds the Poseidon commitment from Part 1 — &lt;code&gt;commitment = Poseidon(salt, taskId)&lt;/code&gt; — which is what binds a proof to exactly one task. A proof for task A cannot be replayed for task B, because the commitment would not match.&lt;/p&gt;

&lt;p&gt;And the circuit itself is the referee. The gatekeeper template asserts the decision against the inputs: feed it a decision that contradicts the fields and the witness generation fails — no proof is produced at all. A wrong answer cannot be dressed up as a proven one. That is the difference between a server that claims it checked and a server that cannot lie about having checked.&lt;/p&gt;

&lt;p&gt;The governing rule throughout is fail closed. Unknown input, expired input, unsigned input: all rejected. A guard that approves what it does not understand is not a guard.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prover at runtime: 45 seconds of patience, then answer anyway
&lt;/h2&gt;

&lt;p&gt;The proof is generated locally with snarkjs — &lt;code&gt;groth16.fullProve&lt;/code&gt; against the official circuit files (1.7 MB wasm, 310 KB proving key) — and handed back for the platform to re-verify against its own registered key. No network, no keys, no spending: the proof is computed on the server and returned.&lt;/p&gt;

&lt;p&gt;The platform allows 60 seconds per response. The gatekeeper gives proving an internal budget of 45 seconds. If proving ever exceeds it, the server answers the decision &lt;em&gt;without&lt;/em&gt; a proof rather than timing out. That is a deliberate trade, and the scoring is why: a correct decision without a proof costs 2 points (12 for the correct call, minus 2 for the missing proof), while a timeout costs 2 points and decides nothing — a correct REJECT without proof still nets +10 on a trap task. Answering late is the only move that is always wrong.&lt;/p&gt;

&lt;p&gt;In practice proving takes well under a second — 270–900 ms locally, 498 ms on the verified practice task — so the 45-second budget is a guardrail, not a routine. But guardrails are the product here. The server also runs a full self-test before accepting any traffic: it proves an APPROVE on the official sample task, verifies the proof locally, and checks that all 13 public signals are present. The &lt;code&gt;/health&lt;/code&gt; endpoint reports the result truthfully from the first request — HMAC configured, circuit files present, self-test status — and &lt;code&gt;GET /health?selftest=1&lt;/code&gt; re-runs it on demand. If the self-test fails, the server still starts (so health can report the failure), but it logs the warning loudly. A guard that cannot prove its own readiness should say so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three scored rounds, honestly
&lt;/h2&gt;

&lt;p&gt;Round 04 closed with 80.0 points and rank #197, with 9 proofs verified. Round 05 added 70 points, taking the total to 150.0 — but the rank slipped to #223 by the morning check and #229 on the dashboard a few hours later, because the agents ahead scored faster. Round 06 added 82 points, taking the total to 232.0 and the rank up to #212. The top three now: pecker at 479.9, Astrex-1 at 470.4, Bnova GateKeeper at 469.3. The gap to first is 247.9 points with two rounds left.&lt;/p&gt;

&lt;p&gt;That is the honest picture, and it is worth saying plainly: the scoring rewards speed as much as correctness. A perfect round is 101 points — eight tasks at +12, plus the +5 reliability bonus — and the leaders are collecting them. Catching first place is now out of reach on points alone: even two perfect rounds (+202) would take us to 434, still below first place's current 479.9. The realistic goal for Rounds 07–08 is to finish strong, keep the rejection record clean, and let the receipts speak.&lt;/p&gt;

&lt;p&gt;One piece of scoring design deserves attention, because it explains the whole architecture: a wrong APPROVE costs −6, a wrong REJECT costs −3. Approving a bad payment is punished twice as hard as rejecting a good one. That asymmetry is why fail-closed is not just a principle — it is the optimal strategy under these rules. When the inputs are ambiguous, the correct move is to reject, take the −3 at worst, and never hand the platform a proven approval for a payment that should not have happened. The gatekeeper's conservatism is not caution for its own sake. It is arithmetic.&lt;/p&gt;

&lt;p&gt;The server itself held up: uptime 99.9% through the round windows, health checks clean, the HMAC secret configured, every task answered inside the deadline. The boring stack from Part 1 — plain Node.js, no framework, Railway — did exactly what boring is supposed to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it never does
&lt;/h2&gt;

&lt;p&gt;For completeness, and because it is the point: this server never holds a wallet key, never signs a transaction, never spends anything. The only secret it holds is the platform HMAC secret. Its on-disk state holds only proof-transaction hashes and task IDs — no secrets, nothing spendable. The gatekeeper judges and proves. That is all it can do, and that is the guarantee.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Rounds 07–08 run nightly, 17:30–03:30 WIB, eight tasks each. The work from here is keeping the endpoint up through every window and letting the checklist do what it does. Creator Track submissions close 21 November, 22:00 UTC.&lt;/p&gt;

&lt;p&gt;Agents will move money. The question is not whether we trust them, but whether we can stop needing to. A guard that proves every rejection — and every approval — is one concrete answer. #AgentGames&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Proof Gatekeeper — receipts, not promises. Built for &lt;a href="https://agentgames.zkverify.io" rel="noopener noreferrer"&gt;Agent Games by zkVerify&lt;/a&gt;. Repo: &lt;a href="https://github.com/lince00/agent-games-gatekeeper" rel="noopener noreferrer"&gt;github.com/lince00/agent-games-gatekeeper&lt;/a&gt; · Live endpoint: &lt;a href="https://gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper" rel="noopener noreferrer"&gt;gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper&lt;/a&gt; · Part 1: &lt;a href="https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap"&gt;Receipts, Not Promises: Building a Payment Guard That Proves Every Decision&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>ai</category>
      <category>blockchain</category>
      <category>zeroknowledge</category>
    </item>
    <item>
      <title>Receipts, Not Promises: Building a Payment Guard That Proves Every Decision</title>
      <dc:creator>Lince Lesta</dc:creator>
      <pubDate>Mon, 16 Nov 2026 00:47:58 +0000</pubDate>
      <link>https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap</link>
      <guid>https://dev.to/lince00/receipts-not-promises-building-a-payment-guard-that-proves-every-decision-ap</guid>
      <description>&lt;p&gt;&lt;em&gt;Creator Track deep-dive — Agent Games Season 01, by Lince (@XL_coin). #AgentGames&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem: agents are about to touch your money
&lt;/h2&gt;

&lt;p&gt;AI agents are moving from chatbots to actors: they will approve transfers, rebalance portfolios, and sign transactions on your behalf. Every one of those actions currently rests on the same foundation — "trust me." The agent says it checked the balance, the recipient, and the limit. You have no way to know whether it did.&lt;/p&gt;

&lt;p&gt;That is the problem I built for. Not a demo of an agent that &lt;em&gt;says&lt;/em&gt; the right thing, but a guard that &lt;em&gt;proves&lt;/em&gt; it did the right thing — every single time, with a zero-knowledge proof the other side can verify without trusting me at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Proof Gatekeeper&lt;/strong&gt; is a public HTTPS endpoint. The platform sends it a signed payment condition — a JSON task describing a proposed transfer — and within 60 seconds it must answer one word, APPROVE or REJECT, plus a Groth16 proof of that decision. The platform re-verifies the proof against its own registered verification key.&lt;/p&gt;

&lt;p&gt;The stack is deliberately boring: a Node.js server with no framework, hosted on Railway, using snarkjs and the tournament's own Groth16/BN128 circuit. Boring is a feature — there is almost nothing to break at 2 a.m. during a scored round.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/lince00/agent-games-gatekeeper" rel="noopener noreferrer"&gt;https://github.com/lince00/agent-games-gatekeeper&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live endpoint: &lt;a href="https://gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper" rel="noopener noreferrer"&gt;https://gatekeeper-production-96ab4a9e.up.railway.app/gatekeeper&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The decision is a checklist, not a judgment call
&lt;/h2&gt;

&lt;p&gt;An LLM deciding "does this look okay?" would be exactly the wrong tool. The gatekeeper runs a deterministic 8-step checklist, in order, and the first failure decides the outcome:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Idempotency&lt;/strong&gt; — have I seen this task before? Answer from cache, never decide twice.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PROOF_REUSED&lt;/strong&gt; — was this proof already submitted for another task? Reject, with no new proof.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VK_SUBSTITUTION&lt;/strong&gt; — does the proof's verification key match the key registered for this condition?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;THRESHOLD_MISMATCH&lt;/strong&gt; — does the public balance meet the required minimum?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RECIPIENT_MISMATCH&lt;/strong&gt; — does the recipient match the condition?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AMOUNT_OVERFLOW&lt;/strong&gt; — is the amount within the permitted maximum?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EXPIRED_CONDITION&lt;/strong&gt; — has the condition expired?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VALID_CONDITION&lt;/strong&gt; — everything checks out. Approve, with proof.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Seven trap varieties, each with its own reason code, each reproducible in practice mode before the first scored round. The test is whether the agent checks every field, not whether it can guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  The proof: reverse-engineering 13 nameless signals
&lt;/h2&gt;

&lt;p&gt;The tournament publishes the circuit files (&lt;code&gt;gatekeeper.wasm&lt;/code&gt;, &lt;code&gt;gatekeeper_final.zkey&lt;/code&gt;) but not the input signal names. To build a prover I had to find all 13 of them by probing the wasm — &lt;code&gt;taskId, minimum, publicBalance, expiryBlock, currentBlock, recipient, conditionRecipient, amount, maxTransfer, registeredVkHash, proofVkHash, salt, decision&lt;/code&gt; — and confirm the commitment formula: the first public signal is &lt;code&gt;Poseidon(salt, taskId)&lt;/code&gt;. That commitment is what ties a proof to exactly one task; a proof for task A cannot be replayed for task B.&lt;/p&gt;

&lt;p&gt;The circuit itself enforces honesty in a way code alone cannot: feed it a wrong decision and it refuses — the assertion fails inside the circuit, so no proof is produced at all. A wrong answer cannot even be dressed up as a proven one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proving that it works — with receipts
&lt;/h2&gt;

&lt;p&gt;Local testing first, all green: a 12-case circuit matrix (valid case plus every trap type, both directions), a 12-case module self-test, and an 11-case live-server end-to-end run covering preflight, approval with a verifying proof, idempotent replay, trap rejection, bad signatures, and malformed input. Proofs take roughly 270–900 ms locally.&lt;/p&gt;

&lt;p&gt;Then the live platform, 16 November 2026, practice mode: the platform dispatched an amount-overflow trap. The gatekeeper answered &lt;strong&gt;REJECT&lt;/strong&gt; — the correct decision — and the platform marked the proof &lt;strong&gt;VERIFIED&lt;/strong&gt;, with &lt;strong&gt;498 ms&lt;/strong&gt; latency against the 60-second deadline. The startup self-test proves a decision in about 1.5 seconds. Every number here comes from a run that actually happened.&lt;/p&gt;

&lt;p&gt;Honest accounting: I missed scored rounds 01–03 while the agent was still being deployed, so the gatekeeper starts the points race from zero with five rounds left. The article is not a victory lap — it is a build log, and the chase is the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  The deployment lesson that cost me an hour
&lt;/h2&gt;

&lt;p&gt;The most instructive failure was not cryptographic at all. I added the platform-issued HMAC secret as a variable in the Railway dashboard and watched the health endpoint still report "secret not configured" — through three minutes of polling and even a manual redeploy. The API confirmed the variable was nowhere in the live config.&lt;/p&gt;

&lt;p&gt;The cause: Railway had staged the change. The dashboard showed "Apply 1 change" with a purple Deploy button, and the variable only became real when that button was clicked. One click later, a new deployment went live and the health check flipped to &lt;code&gt;ok:true&lt;/code&gt;. The lesson generalizes beyond this tournament: a secret you can see in a dashboard is not a secret your server can see, until the change is actually applied. Verify from the server's side, not the dashboard's.&lt;/p&gt;

&lt;h2&gt;
  
  
  What verification does — and does not — do
&lt;/h2&gt;

&lt;p&gt;The field guide says it plainly, and building this made me believe it: verification is necessary, not sufficient. A proof can verify perfectly and still authorize the wrong action. The proof is the receipt; the checks are the judgment. My gatekeeper's value is not the cryptography alone — it is that the cryptography is wrapped around checks that are complete, deterministic, and fail closed. Unknown input, expired input, unsigned input: all rejected. The proof then makes that discipline checkable by a stranger.&lt;/p&gt;

&lt;p&gt;That is the direction I think agentic payments have to go. Agents will move money. The question is not whether we trust them, but whether we can stop needing to. A guard that proves every rejection — and every approval — is one concrete answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;Scored rounds 04–08 run 16–20 November, eight tasks per round, scores cumulative. The gatekeeper is live, the practice proof verified, and the remaining work is keeping it up through every round window. If you are building for Agent Games, the shortest path is the one in the builder field guide: public endpoint, HMAC first, prove locally, practice before the clock starts.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Proof Gatekeeper — receipts, not promises. #AgentGames — built for &lt;a href="https://agentgames.zkverify.io" rel="noopener noreferrer"&gt;Agent Games by zkVerify&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>zeroknowledge</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
