Inspiration
Data vendors like CoinGecko, CoinMarketCap, Birdeye and Messari now sell pay-per-request access over x402: an agent hits an endpoint, gets an HTTP 402 Payment Required, pays a few cents in USDC, and gets the data. No account or API key needed, which makes it a good fit for agents.
The problem is that with the standard x402 exact scheme on Solana, every call is a public USDC transfer from the agent's wallet to the vendor. Sellers often attach a memo for reconciliation, so a transfer can literally say whale-flow/SOL. Anyone watching the chain can see which wallet is buying which feed and how often. If that same wallet trades, a run of SOL whale-flow purchases right before a trade is something a bot can front-run.
People already go to some lengths to hide trading intent. In tradfi, dark pools exist because displayed orders get traded against, and Ethereum users send transactions through private relays to avoid MEV bots. We hadn't seen anyone do this for the data lookups that happen before the trade, so that's what we built.
What it does
Blindfold is a custom x402 v2 scheme :
- An owner deposits USDC into a shared Solana vault and receives blind-signed Cashu protocol ecash tokens from a mint. The tokens are locked to the keys of registered data providers.
- The agent holds the tokens, not a wallet key. When a provider answers with HTTP 402, the agent pays in the
PAYMENT-SIGNATUREheader with exact-change proofs. - The provider redeems the proofs at the mint before serving the data. Nothing goes onchain.
- The mint settles provider balances from the vault in batches on fixed windows, using a hold and rounded amounts.
A direct Blindfold purchase doesn't create any transaction at all. Providers don't have to give up their exact route either; Blindfold is added as another entry in the route's accepts list.
The main way to use it is an MCP server for Claude Code or Claude Desktop. You give Claude a token file and it gets five tools: list_providers, get_balance, quote, buy_data and check_reserves. Ask it to research SOL and it checks prices, buys the whale flow and order-book depth for a few cents each, and tells you whether it would buy, sell or hold. None of those purchases show up onchain. When a purchase goes over 20¢, the server pops up an approval form in Claude through MCP elicitation, and if you say no, the purchase doesn't happen.
Since the agent is reading untrusted feeds and could get prompt-injected, the wallet also has some guardrails:
- Provider lock: tokens can only be redeemed by registered providers, so a prompt-injected "pay this URL" goes nowhere.
- Per-call cap, session budget and owner approval above a threshold, enforced in the wallet, outside the model.
- Reserve gate: before paying, the agent reads the vault balance and the onchain issuance log itself and refuses if the mint has issued more than the vault holds.
There's no MCP tool for approving a payment, raising a limit or skipping the reserve check, so Claude can't talk its way past them. Provider responses are also labelled as untrusted in the tool results. Besides the MCP server there's a scripted CLI agent and an LLM research loop that works with Gemini or any OpenAI-compatible model.
How we built it
Onchain (Rust, Anchor 1.2.2, Solana devnet). The vault program (EsB6NfKVPipU5kEVm2jq14cjopbE7w9hPEFZWVu8jtMo) holds USDC, keeps a provider registry, records deposits as DepositRecord PDAs, and pays providers through settle_batch with sequential batch IDs. Each batch pays 1 to 8 providers, and only to their registered accounts. An IssuanceLog PDA publishes the mint's cumulative issued total and the settled total, so anyone can check reserves.
The mint (TypeScript, Hono, PostgreSQL). It credits quotes from onchain deposits, blind-signs outputs with DLEQ proofs, rejects double spends, and runs settlement. Blind signing follows Cashu's BDHKE.
x402 integration. We used the official @x402/core, @x402/hono and @x402/fetch packages and registered blindfold as a new scheme next to exact. Before building anything else we wrote a quick spike (spikes/x402-cashu) with a real x402 server and client and real cashu-ts crypto, to make sure the idea actually worked.
Wallet SDK and agents. The wallet does provider-locked funding, exact-change proof selection, approval hooks, budget checks under a payment lock, and recovery of pending proofs. The CLI agent, the LLM loop and the MCP server all sit on top of it.
MCP server. A stdio server built on the same wallet as the CLI agent, with its own defaults: 30¢ per-call cap, approval above 20¢, a 50¢ budget per session, and a reserve check before the first paid call and every 10 after that. It also refuses any URL that isn't on a registered provider's origin before making a request. The end-to-end tests drive the real server through an MCP client and cover approve and deny, clients without elicitation, a hostile provider, the budget and the reserve check.
Providers. TokenFeed serves whale flow, order-book depth and trade signals (Coinbase market data with a deterministic fallback) at 5¢, 10¢ and 25¢. We also wrote a gateway that takes Blindfold tokens and buys from upstream exact vendors out of one shared wallet, so agents can use existing x402 vendors without each making their own transfers.
Watching the chain (QuickNode Streams). We wanted to show the leak, not just describe it, so we built the attacker too. A QuickNode Stream on Solana devnet runs a filter that keeps only transactions touching watched USDC accounts, extracts amounts and SPL memos, and decodes vault DepositMade events. Our observer reads that feed (with RPC fallback), profiles wallets, and issues signals like BUY SOL. Deposit events also tell the mint to poll for new deposits right away.
Challenges we ran into
- Privacy only works with other users. If there's only one depositor, the observer can still match their deposit to the batch payout. It can't see which token or how many calls, but it does know who paid for which feed. We built a separate crowd demo to measure this. With $n$ equal deposits and one payout, the observer's best guess is about $1/n$ and it reports
CANNOT ATTRIBUTE. In a second round one owner deposits $2.37 and everyone else deposits $0.10. The small deposits can't add up to the payout, so the observer correctly picks out the big depositor (PARTIAL). Unusual deposit amounts give you away. - The mint is custodial. That's true of every ecash mint and we didn't find a way around it. What we could do was make it auditable with the onchain issuance log, the agent's reserve check, and a public coverage page. The mint could still under-report what it issued, which the README calls out.
- Settlement and redemption edge cases. Providers redeem before they deliver, so a dropped response can lose tokens. Settlement and funding also need to survive a crash between "signed" and "confirmed". We fixed the worst of these and put the rest on the roadmap.
What we learned
- x402 v2 makes it easy to add a new scheme. Ours is one more
acceptsentry andexactclients don't notice. - Blind signatures take care of linking a payment to a deposit. What's left is metadata: deposit amounts, timing, payout totals and which providers got paid. How private it is in practice depends a lot on how many people are using it.
- Spending limits need to live in the wallet code. A model can be convinced to do almost anything, but it can't change the cap or the budget if they aren't in its prompt.
- Building the observer and scorer early meant every privacy claim had a number behind it.
What's next
Reproducible reserve snapshots, a privacy benchmark that runs the same workload through tagged exact, nonce-only exact and Blindfold, recoverable delivery on the gateway so a disconnect doesn't charge twice, a packaged provider adapter, and letting owners pick provider groups.
Built With
- anchor
- cashu
- cashu-ts
- claude
- cloudflare-tunnel
- gemini
- github
- github-actions
- hono
- model-context-protocol
- node.js
- pnpm
- postgresql
- quicknode
- quicknode-streams
- rust
- solana
- solana-kit
- solana-web3.js
- spl-token
- typescript
- usdc
- vitest
- x402