ZECX402 is a payment rail for AI agents built on HTTP 402. No API keys, no accounts, no invoices. An agent asks, gets a price, signs, and gets the answer. Pay with a blind note and the node never learns who you are. Every protocol fee is swept into shielded ZEC.
HTTP/1.1 402 Payment Required x-accepts: exact · shielded x-amount: 0.001000 x-pay-to: zx1provider0entropy x-fee-bps: 100 x-fee-route: zs1qqqqqqq shielded x-payer: anon-agent
Your browser just generated a P-256 key. Pick an agent, send the request, and watch the node refuse, quote, verify your signature, do the work, then settle. Switch to SHIELDED to pay with a blind-signed note instead. Nonces are single-use, quotes expire in 60 seconds, and a failed job is never charged.
Shielded mode uses the same note and nullifier model as Zcash. An agent deposits in public, walks away with a note the node signed without seeing, and later spends it with no link back to the deposit.
The agent picks a random serial, blinds it, and pays a public deposit. The node signs the blinded value: s' = (H(serial) · r^e)^d. It has signed a note it cannot read.
The agent strips the blinding factor: s = s' · r⁻¹. The result is a valid signature on a serial that has never left the agent. One key per denomination, so every note of a size looks alike.
The note goes into X-PAYMENT. The node checks the signature, checks the nullifier set for double spends, does the work, and settles. No address, no key, no account.
Straight talk: this build uses RSA blind signatures (Chaum), not a zk-SNARK. Mint and spend are unlinkable by construction, but your anonymity set is only the other unspent notes of the same denomination, and minting right before spending leaks timing. A SNARK note circuit over a Merkle commitment tree is the upgrade path.
The flywheel is not driven by people trading a ticker. It is driven by machines buying work from other machines, one request at a time.
Any agent hits any ZECX402 endpoint with a plain HTTP request.
The node answers with a price, a recipient and a single-use nonce.
The agent signs the authorization and resends it in X-PAYMENT.
99% goes to the provider. 1% goes to the protocol. No result, no charge.
Half the fee is swept into a shielded ZEC treasury, half buys back $ZECX402.
Launchpads and fee-funded miners both run on trading volume. ZECX402 runs on requests.
| Launchpad model | Fee-mining model | ZECX402 | |
|---|---|---|---|
| Revenue source | New coin launches | Trading fees on the token | Per-request payments from agents |
| Who pays | Traders | Traders | Software buying a service |
| Works with flat volume | No | No | Yes, as long as endpoints are called |
| Outcome variance | Depends on each launch | Depends on finding a block | Every paid call routes a fee |
| Open to builders | Launch a coin | Hold only | Paywall any endpoint in three lines |
| Payer privacy | Creator hidden, traders public | None | Blind notes: payer unlinkable per request |
| ZEC link | Proceeds paid shielded | Block rewards fund buybacks | Fees swept shielded, plus buyback |
The node and the autonomous agent in this repo are the whole protocol. Read them in ten minutes.
// server.js AGENTS.summarize = { price: 3_000, // 0.003 USDG payTo: 'zx1yourwallet', run: (q) => summarize(q), }; // GET /api/agents/summarize/run // -> 402 quote -> X-PAYMENT -> 200
// agent.js let res = await fetch(url); if (res.status === 402) { const { accepts: [quote] } = await res.json(); if (quote.maxAmountRequired > budget) throw 'over budget'; res = await fetch(url, { headers: { 'x-payment': sign(quote) }, }); }
$ node server.js · $ node agent.js (shielded) · $ PUBLIC=1 node agent.js
Public payments show a payer. Shielded payments show only a nullifier.