Turnstile is a market where a seller publishes a priced service at an ENS name, and a buyer's agent discovers it, reads the price from the chain, gets 402 Payment Required, pays per query in HBAR on Hedera or USDC on Arc, and gets an answer, inside a spending limit the agent itself can never raise.
Built solo in September 2026 for ETHOnline 2026 hackathon and won two prizes: Hedera's AI and agentic payments prize ($2,000) and second place in The Graph's best AI tooling category ($1,500).
This post is the overview. The nine deep dives, in reading order:
AI agents now have a standard way to register themselves on chain, ERC-8004. I read a sample of 197 registrations from short block windows on Base, Ethereum mainnet and Sepolia (Base alone has about 85,000) and asked one question of each: can a buyer's program learn what this agent costs before it pays?
Two could, and neither through the standard, because the registration format has no price field. Mine publishes its price in an ENS record. One other agent, Capminal, quotes a price in the 402 its endpoint returns. 76 Virtuals agents list a number in the jobOfferings field of ACP, Virtuals' Agent Commerce Protocol, with no currency attached. Most of the rest set an x402Support flag, which says they take payment, with no working endpoint to ask. So agents can find each other, but they cannot buy anything from each other in a way a program can reason about.
Two more gaps sit behind that one.
The market page counts only the prices it can read. It misses the Capminal quote and the Virtuals prices; Part 4 explains why.
Turnstile is a market where a seller publishes a priced service at an ENS name, and the resolver record is the offer: price, payment rails and endpoint, read live on-chain on every request. A buyer's agent finds the seller, reads the price, gets a 402 Payment Required, pays per query in HBAR on Hedera or USDC on Arc, and gets an answer.
To prove the whole loop, the market needed one seller worth paying. For Turnstile, it is the Liquidity Analyst at liquidity.turnstile.eth, and it answers one question about a Uniswap pool: is it safe to LP? It reads the pool's history from a Messari-standard subgraph on The Graph and quotes live trades against Uniswap's QuoterV2. It then returns ACCEPTABLE, CAUTION or AVOID, with a confidence score and the numbers behind each signal. Ranked by TVL, the top pool on our own subgraph was a fake USDT holding two trillion of itself and none of the real one, and it couldn't fill a $1,000 trade. That gap between what an index reports and what a trade can actually do is what the seller charges seven cents to find.
The buyer's organisation gives that agent a spending mandate, and the agent can never raise its own limit. Built it solo in September 2026 for ETHOnline 2026.
The request path has six steps.
flowchart TD
A["01 Discover<br/>ERC-8004 · Substreams"] --> B["02 Read the offer<br/>ENSv2 resolver · turnstile:price"]
B --> C["03 Ask<br/>MCP"]
C --> D["04 402<br/>quote"]
D --> E["05 Pay<br/>x402 on Hedera · USDC on Arc"]
E --> F["06 Answer<br/>the result, not the method"]
liquidity.turnstile.eth on Sepolia, carries its price and endpoint in standard ENSIP-25/26 records. Nothing is cached or hard-coded.mcp-turnstile, a four-tool MCP server with a SKILL.md. It has no code path for any particular seller. PaymentRail seam with two implementations: x402 on Hedera settled through Blocky402, and Circle Gateway nanopayments in USDC on Arc. The same query settles identically over either.
The design rests on one invariant: the key that spends can never raise its own limit. Authority is split across three tiers.
| Tier | Holds | May authorise |
|---|---|---|
| Cold (a separate operator key) | The seller's identity; owns the ENS name | Rotating the hot key, changing the payout address, raising the price ceiling |
| Warm (Privy) | The buyer organisation's wallet and mandate policy | Funding the agent ( depositFor , to that agent only, up to a cap, paying the gas), issuing a mandate, raising a cap (needs a quorum), adding an agent |
| Hot (Circle, Arc) | The buyer agent's spending wallet | Nothing. It spends inside the mandate and signs offchain only |
Each tier is enforced where it lives:
setAddr call to change the payout address reverts with EACUnauthorizedAccountRoles. A Forge test forked from live Sepolia covers that revert. 401. 1. The offer lives in the ENS record, not in the API. Price, rails and endpoint are standard ENSIP keys on the seller's name, read from Sepolia on every page load. Anyone can read an offer without trusting Turnstile, and the market cannot serve a stale price. The cost is a live RPC dependency: without SEPOLIA_RPC_URL the seller page shows nothing.
2. Split authority by role, and leave custody for later. The three tiers are separate: the chain and Privy decide which key can do what, so the hot key can't move money it doesn't control. Custody is the next step. The cold key is still an ordinary software key, not stored in a hardware wallet, so the split protects against a leaked hot key but not against a compromised operator machine. Making it cold in practice means generating it offline and signing on an air-gapped device. I planned that around Ledger's key ring, which my only device turned out not to support.
3. Rail-agnostic Settlement sits behind one PaymentRail interface. That keeps adding extra rails cheap and made "the same query settles on both rails" easy to implement. The rails still behave differently, because Hedera and Circle implement 402 payments differently: on Hedera, a facilitator settles each payment as it arrives, while Circle collects payments and settles them in batches.
4. Sell the answer, keep the method. The analyst's scoring runs in a Chainlink CRE confidential workflow. It is designed to run inside an enclave, with the seller's calibration held as a secret. What reaches chain is the rating, the confidence, which checks failed, and a hash of the evidence bundle. A buyer can check that the verdict commits to the exact bytes they paid for, without being able to reproduce it.
The workflow runs in Chainlink's simulator, but deploying it to the oracle network needs two approvals Chainlink hadn't granted by the deadline: deploy access, and the Confidential Workflows private beta. So the verdict on Sepolia was written by my key, from the same scoring run outside the enclave. It shows the buyer's check works, but nothing has been attested yet.
Every item here links to a transaction, a document or a test. The project's EVIDENCE.md has one row per claim.
402 Payment Required unpaid, and the MCP URL the ENS record publishes served the tools over HTTP/SSE. The /onboard page. The server verifies the proof with World's Developer Portal, keeps only the nullifier (a per-app pseudonym for the human), and stores it under the listing's ERC-8004 agent id, which is what the market reads. The market now lists our seller as verified. One human, one proof so far; the three-listing cap is covered by tests, not by more real proofs.