<?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>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>
