<?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: agentzeny</title>
    <description>The latest articles on DEV Community by agentzeny (@agentzeny).</description>
    <link>https://dev.to/agentzeny</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3969824%2F62bc0a3e-0514-47b5-8ee7-a78fbda97d14.png</url>
      <title>DEV Community: agentzeny</title>
      <link>https://dev.to/agentzeny</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/agentzeny"/>
    <language>en</language>
    <item>
      <title>How We Built Private Agent Payments on Solana with Zero-Knowledge Proofs</title>
      <dc:creator>agentzeny</dc:creator>
      <pubDate>Fri, 05 Jun 2026 15:09:15 +0000</pubDate>
      <link>https://dev.to/agentzeny/how-we-built-private-agent-payments-on-solana-with-zero-knowledge-proofs-kmh</link>
      <guid>https://dev.to/agentzeny/how-we-built-private-agent-payments-on-solana-with-zero-knowledge-proofs-kmh</guid>
      <description>&lt;p&gt;The AI agent economy is scaling fast. Agents pay for APIs, buy data from other agents, settle trades, and manage resources autonomously. But running these agents on public blockchains introduces a critical flaw: &lt;strong&gt;surveillance&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When every on-chain agent payment is public, an agent's entire financial graph becomes visible. Anyone can see who an agent paid, how much, and when. This reveals the agent's strategy, its vendor partnerships, and its vulnerabilities.&lt;/p&gt;

&lt;p&gt;For AI agents to function effectively in a competitive economy, they need the digital equivalent of cash.&lt;/p&gt;

&lt;p&gt;That's why I built &lt;strong&gt;SNAP&lt;/strong&gt; (Shield Network Agent Payments) — a privacy protocol purpose-built for AI agent-to-agent payments on Solana. This is a deep dive into how it works, the architecture choices I made, and the challenges of putting zero-knowledge proofs on Solana.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: Payment Graphs Leak Strategy
&lt;/h2&gt;

&lt;p&gt;Consider an autonomous trading agent. It sources price data from Agent A, executes trades through Agent B, and pays for compute from Agent C. On a public blockchain, any observer can reconstruct this entire supply chain just by watching the payment graph.&lt;/p&gt;

&lt;p&gt;A competitor doesn't need to hack your agent. They just need a block explorer.&lt;/p&gt;

&lt;p&gt;This isn't hypothetical. MEV bots already exploit transaction visibility on Solana and Ethereum. As agents become larger economic actors, payment graph analysis becomes the next attack vector.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Approach: Commitment-Nullifier Scheme
&lt;/h2&gt;

&lt;p&gt;To break the link between sender and receiver, SNAP uses a commitment-nullifier scheme powered by Groth16 zero-knowledge proofs.&lt;/p&gt;

&lt;p&gt;Instead of Agent A sending SOL directly to Agent B, the transaction goes through a &lt;strong&gt;shielded pool&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deposit:&lt;/strong&gt; Agent A deposits a fixed denomination (e.g., 0.1 SOL) into the pool alongside a cryptographic commitment — &lt;code&gt;Poseidon(secret, nullifier)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transfer:&lt;/strong&gt; Agent A sends a "secret note" (the commitment pre-image) to Agent B through any private channel.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Withdraw:&lt;/strong&gt; Agent B generates a ZK proof demonstrating they possess a valid note for some commitment in the pool, without revealing &lt;em&gt;which&lt;/em&gt; commitment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key is the &lt;strong&gt;nullifier&lt;/strong&gt; — a unique hash derived from the secret note. When Agent B withdraws, the on-chain program records the nullifier hash to prevent double-spending. Because the commitment and nullifier are Poseidon hashes, observers cannot link the nullifier back to the original commitment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Deposit:  commitment = Poseidon(secret, nullifier)  →  stored in Merkle tree
Withdraw: nullifierHash = Poseidon(nullifier)        →  checked against nullifier set
          proof verifies: "I know (secret, nullifier) such that
                           Poseidon(secret, nullifier) is in the tree
                           AND nullifierHash = Poseidon(nullifier)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An observer sees deposits going in and withdrawals going out, but cannot connect any specific withdrawal to any specific deposit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;The system has four components: the Solana program, ZK circuits, on-chain Merkle state, and an off-chain relayer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solana Program (Rust/Anchor)
&lt;/h3&gt;

&lt;p&gt;The on-chain program exposes three core instructions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;deposit&lt;/code&gt;&lt;/strong&gt; — Takes the user's funds and a 32-byte commitment. Inserts the commitment into the pool's Merkle tree.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;withdraw_zk&lt;/code&gt;&lt;/strong&gt; — Takes a Groth16 proof, nullifier hash, recipient, and Merkle root. Verifies the proof on-chain using BN254 pairing operations and transfers funds to the recipient.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;withdraw_zk_relayed&lt;/code&gt;&lt;/strong&gt; — Same verification, but the relayer submits the transaction and takes a 0.25% fee from the withdrawal amount.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Solana's native &lt;code&gt;alt_bn128&lt;/code&gt; precompiles make Groth16 verification possible directly on-chain. The challenge was fitting the pairing operations within Solana's 1.4M compute unit limit per transaction — this required careful optimization of the verifier code.&lt;/p&gt;

&lt;h3&gt;
  
  
  ZK Circuit (circom/Groth16)
&lt;/h3&gt;

&lt;p&gt;The withdrawal circuit (&lt;code&gt;withdraw_20.circom&lt;/code&gt;) proves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The prover knows a &lt;code&gt;secret&lt;/code&gt; and a &lt;code&gt;nullifier&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Poseidon(secret, nullifier)&lt;/code&gt; equals a commitment that exists in the Merkle tree&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Poseidon(nullifier)&lt;/code&gt; equals the publicly submitted &lt;code&gt;nullifierHash&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The Merkle path is valid for the given &lt;code&gt;root&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;The proof is bound to a specific &lt;code&gt;recipient&lt;/code&gt; address (preventing front-running)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The circuit uses a depth-20 Merkle tree, supporting over 1 million deposits per pool (1,048,576 leaves). Poseidon is the hash function throughout — it's ZK-friendly (low constraint count) and collision-resistant.&lt;/p&gt;

&lt;h3&gt;
  
  
  On-Chain State: Commitment Pages
&lt;/h3&gt;

&lt;p&gt;Storing a depth-20 Merkle tree on Solana is non-trivial. A naive approach would require a single account holding all 1M+ commitments, which exceeds Solana's 10MB account size limit.&lt;/p&gt;

&lt;p&gt;SNAP uses &lt;strong&gt;CommitmentPage&lt;/strong&gt; accounts — paginated storage where each page holds a slice of the tree's leaves. When a deposit occurs, the commitment is inserted into the current page. For verification, the SDK reconstructs the Merkle path client-side from the commitment pages and passes the path as proof inputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NullifierRecord&lt;/strong&gt; PDAs track spent nullifiers. Each nullifier maps to a PDA derived from &lt;code&gt;[pool_address, nullifier_hash]&lt;/code&gt;. The program checks if the PDA exists (already spent) before allowing a withdrawal.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Relayer: Solving the Gas Problem
&lt;/h3&gt;

&lt;p&gt;Even with ZK proofs breaking the payment link, a privacy leak remains: &lt;strong&gt;gas fees&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If Agent B withdraws to a fresh wallet, how does it pay the Solana transaction fee? If it funds the wallet from an existing account, the privacy is compromised — an observer can link the funding transaction to the withdrawal.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;SNAP Relayer&lt;/strong&gt; solves this. It's an Express service that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Receives a withdrawal request (ZK proof + parameters) from the agent&lt;/li&gt;
&lt;li&gt;Verifies the proof off-chain (fast sanity check)&lt;/li&gt;
&lt;li&gt;Builds and submits the Solana transaction, paying the gas fee&lt;/li&gt;
&lt;li&gt;Deducts a 0.25% protocol fee from the withdrawal amount&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This means agents can withdraw to completely fresh, unfunded wallets with zero on-chain footprint connecting the recipient to any prior activity.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Agent B withdraws via relayer — no gas needed&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;snap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withdrawViaRelayer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;note&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;freshRecipientWallet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://relayer.agentzeny.ai&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// result: { txSignature, fee, recipientReceived }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  SDK: 5 Lines to Private Payments
&lt;/h2&gt;

&lt;p&gt;A privacy protocol that requires a PhD to use is a protocol nobody uses. The SDK (&lt;code&gt;snap-solana-sdk&lt;/code&gt;) wraps the entire flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;PublicKey&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@solana/web3.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SNAPClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;snap-solana-sdk&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Connection&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://your-rpc-url.com&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sender&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Keypair&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;PublicKey&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Agent A deposits&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;snap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SNAPClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;sender&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;note&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;snap&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deposit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;serialized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;SNAPClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serializeNote&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;note&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Send `serialized` to Agent B through any private channel&lt;/span&gt;

&lt;span class="c1"&gt;// Agent B withdraws&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;snapB&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SNAPClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;recipient&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tx&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;snapB&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;withdraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;SNAPClient&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deserializeNote&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;serialized&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nx"&gt;recipient&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SDK handles commitment generation, Merkle path reconstruction, proof generation (WASM-based snarkjs), and transaction building. The developer never touches circom constraints or BN254 math.&lt;/p&gt;

&lt;h2&gt;
  
  
  Agent Framework Integrations
&lt;/h2&gt;

&lt;p&gt;Privacy should plug into whatever agent framework you're already using:&lt;/p&gt;

&lt;h3&gt;
  
  
  Solana Agent Kit
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SolanaAgentKit&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;solana-agent-kit&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// SNAP plugin auto-registers snap_deposit, snap_withdraw, snap_withdraw_private&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;SolanaAgentKit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rpcUrl&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;h3&gt;
  
  
  LangChain / LangGraph
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;snap-langchain-tools @langchain/core
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createSNAPTools&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;snap-langchain-tools&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createReactAgent&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@langchain/langgraph/prebuilt&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createSNAPTools&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;wallet&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Returns: [snap_list_pools, snap_deposit, snap_withdraw, snap_estimate_fee]&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createReactAgent&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;tools&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[{&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;user&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Deposit 0.1 SOL into the SNAP pool&lt;/span&gt;&lt;span class="dl"&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;h3&gt;
  
  
  MCP Server (Claude Code, Cursor, etc.)
&lt;/h3&gt;

&lt;p&gt;SNAP also ships as an MCP server, so any MCP-compatible AI coding assistant can execute private payments as part of its tool set.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mainnet Pools
&lt;/h2&gt;

&lt;p&gt;SNAP is live on Solana mainnet with three pools:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pool&lt;/th&gt;
&lt;th&gt;Address&lt;/th&gt;
&lt;th&gt;Denomination&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SOL&lt;/td&gt;
&lt;td&gt;&lt;code&gt;B8SyffZKt8LABKogWjH9rZcjY5PV2hyYRCbTxxbcrpFf&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0.1 SOL&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USDC&lt;/td&gt;
&lt;td&gt;&lt;code&gt;5LeuHrPBgHNhgbCy996MEjcsBk5gNHhVj6AiuuCHZ8od&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;1 USDC&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;USDC&lt;/td&gt;
&lt;td&gt;&lt;code&gt;ECuHf8kgiWfmL3Q6id4WGBQWvuukhzqvF5vsxuPAKZBv&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;10 USDC&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Program ID: &lt;code&gt;9uePoqdgaXpqFLQM2ED1GGQrwSEiqe3r6tW1AfsnrrbS&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Fixed denominations are a privacy feature, not a limitation. When every deposit is the same size, deposits become indistinguishable — the anonymity set is the entire pool.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ZK artifact management is harder than ZK math.&lt;/strong&gt; Bundling WASM files, zkeys, and verification keys into an npm package that works in Node.js environments required more engineering than the circuit itself. Agents run in server environments, not browsers — the artifact loading pipeline had to work with &lt;code&gt;require()&lt;/code&gt;, not &lt;code&gt;fetch()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Agents need API-first privacy.&lt;/strong&gt; Agents don't click buttons in web wallets. They execute scripts. Reducing the integration surface to 5 lines of code was harder than building the smart contract, but it's what makes the protocol actually usable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solana's compute limits are tight but workable.&lt;/strong&gt; Groth16 verification on BN254 fits within the 1.4M compute unit budget, but just barely. Every unnecessary operation in the on-chain verifier had to go.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The relayer is the most underrated component.&lt;/strong&gt; Without gas abstraction, ZK proofs alone don't provide full privacy. The relayer closes the last gap.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Security audit&lt;/strong&gt; — Engaging a ZK/Solana audit firm for the program and circuits&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-party trusted setup ceremony&lt;/strong&gt; — Expanding beyond the current single-contributor setup&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Larger denomination pools&lt;/strong&gt; — As the protocol hardens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;More framework integrations&lt;/strong&gt; — ElizaOS, Coinbase AgentKit, and others in progress&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;SNAP is fully open source. If you're building AI agents on Solana and want private payments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/agentzeny/snap-public" rel="noopener noreferrer"&gt;github.com/agentzeny/snap-public&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK:&lt;/strong&gt; &lt;code&gt;npm install snap-solana-sdk&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LangChain tools:&lt;/strong&gt; &lt;code&gt;npm install snap-langchain-tools&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://agentzeny.ai" rel="noopener noreferrer"&gt;agentzeny.ai&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your agent's payment graph is a map of your business.&lt;/p&gt;

</description>
      <category>solana</category>
      <category>zeroknowledge</category>
      <category>aiagents</category>
      <category>privacy</category>
    </item>
  </channel>
</rss>
