<?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: Mihawnk Nft</title>
    <description>The latest articles on DEV Community by Mihawnk Nft (@mihawnk_nft).</description>
    <link>https://dev.to/mihawnk_nft</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%2F4249254%2Fd740dac6-8964-4320-b12d-27e578f9c150.png</url>
      <title>DEV Community: Mihawnk Nft</title>
      <link>https://dev.to/mihawnk_nft</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mihawnk_nft"/>
    <language>en</language>
    <item>
      <title>Muse Goat: My Proof Gatekeeper for zkVerify Agent Games</title>
      <dc:creator>Mihawnk Nft</dc:creator>
      <pubDate>Tue, 17 Nov 2026 08:11:07 +0000</pubDate>
      <link>https://dev.to/mihawnk_nft/muse-goat-my-proof-gatekeeper-for-zkverify-agent-games-1amd</link>
      <guid>https://dev.to/mihawnk_nft/muse-goat-my-proof-gatekeeper-for-zkverify-agent-games-1amd</guid>
      <description>&lt;h1&gt;
  
  
  Muse Goat: My Proof Gatekeeper Learned to Prove It Played by the Rules
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;My entry for the zkVerify Agent Games Creator Track (#AgentGames, @ZKVProtocol). The agent is live in the Proof Gatekeeper track -- and the most interesting part of building it wasn't the decision logic. It was the two days the platform refused to believe my agent existed at all.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The game in one line
&lt;/h2&gt;

&lt;p&gt;Your agent receives a signed task, makes a decision, and writes its own zero-knowledge proof that the decision followed the rules -- so it proves it played by the rules without revealing how it decided.&lt;/p&gt;

&lt;p&gt;In Proof Gatekeeper, the platform sends a signed JSON task to your agent's public HTTPS endpoint. The agent must verify the HMAC signature on the raw body &lt;em&gt;before doing anything&lt;/em&gt;, decide APPROVE or REJECT within 60 seconds, and attach a Groth16 proof that the platform re-verifies against its own registered verification key. The platform doesn't trust your decision. It checks the proof.&lt;/p&gt;

&lt;p&gt;My agent is &lt;strong&gt;Muse Goat&lt;/strong&gt;. It runs on a Cloudflare Worker (plain JavaScript, no build step), and its code is public:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repository: &lt;a href="https://github.com/mihawnk-nft/Muse-goat" rel="noopener noreferrer"&gt;https://github.com/mihawnk-nft/Muse-goat&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Live endpoint: &lt;a href="https://silent-leaf-1bdf.mihawnknft.workers.dev/agent" rel="noopener noreferrer"&gt;https://silent-leaf-1bdf.mihawnknft.workers.dev/agent&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The two bugs that kept me out
&lt;/h2&gt;

&lt;p&gt;The first version of the endpoint was live, responding, and healthy -- and the dashboard still failed its preflight with the same stubborn message: &lt;em&gt;"must return signed protocol-v1 JSON."&lt;/em&gt; I spent two days on it, and the cause turned out to be two bugs, not one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 1: the real task envelope is nested, and v1 assumed it was flat.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The sample task on the event page carries its decision fields &lt;em&gt;nested under &lt;code&gt;input&lt;/code&gt;&lt;/em&gt;, with different names than I expected: &lt;code&gt;registered_vk&lt;/code&gt;, &lt;code&gt;proof_vk&lt;/code&gt;, &lt;code&gt;minimum&lt;/code&gt;, &lt;code&gt;public_balance&lt;/code&gt;, &lt;code&gt;expiry_block&lt;/code&gt;, &lt;code&gt;current_block&lt;/code&gt;, &lt;code&gt;recipient&lt;/code&gt;, &lt;code&gt;condition_recipient&lt;/code&gt;, &lt;code&gt;amount&lt;/code&gt;, &lt;code&gt;max_transfer&lt;/code&gt;, &lt;code&gt;proof_tx&lt;/code&gt;. My v1 read them as flat top-level fields. That meant v1 would have rejected &lt;em&gt;every real task&lt;/em&gt; with &lt;code&gt;MISSING_FIELD_VK&lt;/code&gt; -- it was looking for the verification key in a place the platform never puts it.&lt;/p&gt;

&lt;p&gt;v2 unwraps &lt;code&gt;input&lt;/code&gt; (top-level kept as a fallback), with a field map that tries the real names first and legacy flat names second. A missing required field fails closed -- it never guesses a value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 2: the dashboard's probe is not a task, and v1 treated it like one.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The preflight probe the dashboard sends carries a &lt;code&gt;task_id&lt;/code&gt; (and a proof-gatekeeper &lt;code&gt;type&lt;/code&gt;) but &lt;em&gt;no decision fields&lt;/em&gt;. v1 saw the &lt;code&gt;task_id&lt;/code&gt;, classified the body as a task, ran the decision logic, and answered 401 / &lt;code&gt;MISSING_FIELD_VK&lt;/code&gt;. The dashboard read that as "this endpoint doesn't speak protocol v1."&lt;/p&gt;

&lt;p&gt;v2 draws the line exactly: a body is a task &lt;em&gt;only&lt;/em&gt; if it carries an &lt;code&gt;input&lt;/code&gt; object or decision fields. A &lt;code&gt;task_id&lt;/code&gt; without decision fields is a probe -- and a probe gets a signed handshake: &lt;code&gt;{ok: true, protocolVersion: "v1"}&lt;/code&gt;, with the &lt;code&gt;x-agent-games-signature&lt;/code&gt; header.&lt;/p&gt;

&lt;p&gt;I also chased a red herring along the way: I tried hex-decoding the HMAC secret before signing (v1.5). That failed preflight too, so the signing convention wasn't the cause. v2 is back on the standard convention -- the secret string as the HMAC key -- and request verification still accepts both, so a platform that signs either way gets in.&lt;/p&gt;

&lt;p&gt;After the fix, the deploy took minutes: paste the v2 code into the Worker, save the endpoint URL in the dashboard, and the preflight came back &lt;strong&gt;OK -- Healthy, 369ms&lt;/strong&gt;. The agent is ACTIVE. Rounds 3-4 are running; no tasks have arrived yet (0/16 answered), so the real test is still ahead.&lt;/p&gt;

&lt;h2&gt;
  
  
  The decision: seven checks, no LLM in the loop
&lt;/h2&gt;

&lt;p&gt;An LLM never makes the final call. The decision is seven deterministic checks, and any failure -- or any exception -- means REJECT. Fail closed, always:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Task type&lt;/strong&gt; -- must be the Proof Gatekeeper game, or &lt;code&gt;BAD_CIRCUIT&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verification key&lt;/strong&gt; -- the proof's &lt;code&gt;proof_vk&lt;/code&gt; must match the task's &lt;code&gt;registered_vk&lt;/code&gt;, or &lt;code&gt;VK_SUBSTITUTION&lt;/code&gt;. (This is the event page's trap example: a substituted verification key is the classic way to smuggle a fake proof past a guard.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recipient&lt;/strong&gt; -- a valid &lt;code&gt;0x&lt;/code&gt; address, and it must match &lt;code&gt;condition_recipient&lt;/code&gt;, or &lt;code&gt;BAD_RECIPIENT&lt;/code&gt; / &lt;code&gt;RECIPIENT_MISMATCH&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Threshold&lt;/strong&gt; -- the public balance must meet the minimum, or &lt;code&gt;THRESHOLD_MISMATCH&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Amount&lt;/strong&gt; -- positive, and within the single-transfer cap, or &lt;code&gt;BAD_AMOUNT&lt;/code&gt; / &lt;code&gt;AMOUNT_EXCEEDS_MAX&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expiry&lt;/strong&gt; -- the current block must not pass the expiry block, or &lt;code&gt;EXPIRED&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timestamps&lt;/strong&gt; -- &lt;code&gt;issued_at&lt;/code&gt; reasonably fresh (60-minute tolerance for delivery delay), &lt;code&gt;deadline_at&lt;/code&gt; in the future, or &lt;code&gt;BAD_TIMESTAMP&lt;/code&gt; / &lt;code&gt;EXPIRED&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Proof reuse&lt;/strong&gt; -- a &lt;code&gt;proof_tx&lt;/code&gt; that was already approved is never approved twice, or &lt;code&gt;PROOF_REUSED&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few things I was deliberate about: the HMAC is verified over the &lt;em&gt;raw&lt;/em&gt; body before any JSON parsing, and compared in constant time (no early-exit timing leak). The secret is never in the repo -- it comes from the dashboard's "Rotate Secret" as an environment variable, never committed, never pasted in chat, never logged. The request log records only top-level &lt;em&gt;keys&lt;/em&gt;, never values. And the proof-reuse seen-set is in-memory only, which is a known gap: a Worker isolate restart clears it, so for production it belongs in Workers KV -- a reused proof must stay rejected across restarts.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest gap: the proof isn't there yet
&lt;/h2&gt;

&lt;p&gt;I'll say this plainly, because the whole point of this tournament is not trusting claims: &lt;strong&gt;v2 does not generate a Groth16 proof yet.&lt;/strong&gt; It returns &lt;code&gt;proof: null&lt;/code&gt; / &lt;code&gt;public_signals: null&lt;/code&gt;, and takes the -2 penalty for it. The decision logic is real and tested (21/21 local tests pass), the signature verification is real, and the endpoint is live and healthy -- but the zero-knowledge proof itself is the next upgrade: generate it with snarkjs, submit it through Kurier, and poll until it reaches Finalized on zkVerify mainnet.&lt;/p&gt;

&lt;p&gt;That gap is exactly why I wanted to write this article. The tournament's premise is that an agent's word is worthless and only a verified proof counts -- and that standard should apply to the builders too. So here is the honest state of my agent: a gatekeeper that verifies signatures, checks seven rules, fails closed, and is live. The proof is the next commit, not a claim in this article.&lt;/p&gt;

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

&lt;p&gt;The preflight saga taught me the real lesson of this track: &lt;strong&gt;the interface is the product.&lt;/strong&gt; My decision logic was correct from the start -- the platform never got far enough to see it, because my endpoint couldn't tell a handshake from a task. Two classification bugs, both in the first twenty lines of request handling, cost two days. The circuit, the proof, the scoring -- none of it matters if the handshake fails.&lt;/p&gt;

&lt;p&gt;The second lesson is the one the tournament is built on: don't trust, verify. Not just the agent's decisions, but the builder's claims -- including mine. That's why the code is public, the endpoint is live, and the missing proof is stated here instead of hidden.&lt;/p&gt;

&lt;p&gt;If the rounds send tasks, Muse Goat will answer them. If the proof upgrade lands, it will answer with a proof attached. Either way, the gatekeeper is standing at its post.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Muse Goat -- Proof Gatekeeper, Agent Games Season 01 (21 Oct - 21 Nov 2026, judging 22-30 Nov). Built with a Cloudflare Worker, plain JS, no build step. Repo: &lt;a href="https://github.com/mihawnk-nft/Muse-goat" rel="noopener noreferrer"&gt;https://github.com/mihawnk-nft/Muse-goat&lt;/a&gt; | Endpoint: &lt;a href="https://silent-leaf-1bdf.mihawnknft.workers.dev/agent" rel="noopener noreferrer"&gt;https://silent-leaf-1bdf.mihawnknft.workers.dev/agent&lt;/a&gt; | #AgentGames @ZKVProtocol&lt;/em&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>blockchain</category>
      <category>security</category>
    </item>
  </channel>
</rss>
