Till

Get paid by people and AI agents that can't be tricked into overpaying.

Till

Created At

ETHGlobal Mumbai

Project Description

Till is a checkout a small online shop adds in about 20 lines to get paid in USDT by two kinds of customers: people and AI agents.

Try it live at till.ishtails.xyz: open the demo shop, sign in with any email, get free test USDT, and buy a $0.10 report.

People pay with just an email or a Google login: no wallet app, no seed phrase and no gas. They sign the payment, and Till's relayer submits it on Whitechain and pays the fee.

AI agents pay per API call over x402, with no sign-up, API key or monthly bill. They settle in USDT on Whitechain or USDC on Hedera.

After the payment, the merchant refunds in one click, in full or in part, and the contract never lets a refund pass what was paid. Agent payments on Whitechain refund the same way. The dashboard exports a CSV for the accountant, and the merchant prepays its customers' gas from a gas tank in USDT, charged at cost plus 10%. Every receipt is saved on Arkiv, so the customer's receipt page, and a list of their purchases from every Till shop, don't depend on the shop's database.

The second half is a spending guard for whoever runs the agent: an allowlist, per-call and daily caps, and a daily budget, all checked in the agent's wallet before anything is signed. A payment that breaks a rule is blocked outright; one that's only unusual, above the auto-pay limit, waits for the owner to approve it on their phone. The owner signs the limits, and the agent checks that signature, so even Till can't loosen them. Before the event I tested a poisoned-link attack on three Claude models, and it fooled every one, every time. In the demo, a review page sends the agent to a look-alike API that asks 10 times the price. The guard blocks it, because the payee isn't on its list or the shop's address in Till's registry on Arkiv. Every payment, approval and blocked attempt goes to a public log on Hedera, and the agent's identity is registered on ERC-8004.

How it's Made

A Bun monorepo: a Hono server, a React app (Vite, Tailwind, shadcn/ui on Base UI, Motion) for the landing page, docs, checkout, receipts, the customer's account, the merchant dashboard and the agent console (each opens only for its own wallet), a separate demo shop that only uses our SDK, and the agent. It runs live on one small server behind Caddy, at till.ishtails.xyz; the live demo has a faucet that sends a new email wallet 0.2 test USDT, gas-free through the same relayer, with per-wallet and daily limits.

Whitechain: customers sign in with a Privy email or Google wallet and sign an EIP-3009 ReceiveWithAuthorization for the test USDT. Our relayer submits it to a small Checkout contract (Foundry, verified on Blockscout), which pays the merchant and emits Paid and Refunded events keyed by order ID. Refunds can be partial, and the contract caps their total at the amount paid. A checkout payment costs about 180k gas (~0.0009 WBT). Each merchant has a gas tank: the relayer reads the real fee of every transaction it sends for that shop from the receipt, charges it in USD plus 10%, and stops relaying when the tank is empty; top-ups are USDT transfers the merchant signs. Refunds of agent payments are EIP-3009 transfers back to the agent, signed by the merchant and submitted by the relayer. The relayer only signs three calls, only for real orders from registered merchants, simulates each one first, and has rate limits and daily caps.

Agent payments use x402 v2 (@x402/core, /evm, /hedera). The same server is our own x402 facilitator on Whitechain (chain 1874) and on Hedera, where we added an expiry check and a settlement cache on top of the library, with x402.org as the fallback. The agent is Claude, run headless on the claude CLI with only an MCP wallet server as its tools. The spending guard runs in the x402 client's onBeforePaymentCreation hook, inside the wallet, so the model can't talk its way past it. Payments above the auto-pay limit pause there: the agent posts an approval request, the owner approves or denies on the console with a wallet-signed message, and the agent polls for the answer. The limits themselves are signed by the owner on the console, and the agent verifies the signature before using them. Paid, approved and blocked attempts are written to a Hedera Consensus Service topic, and after each run the agent's spend report reads them back from the public mirror node. The agent is registered in the ERC-8004 Identity Registry already deployed on Hedera testnet; it puts its ID in each x402 payment's extensions, and the server checks the payer against the registry after settling.

Arkiv: after each payment or refund, the server saves a receipt record on Arkiv's Rabdi testnet (SDK 1.0.1) with a typed schema. The receipt page and the customer's account page query Arkiv straight from the browser, filtered to our writer wallet, so they still load with our server stopped. The server also lists each merchant on Arkiv (prices, payout addresses per network); the agent's find_sellers tool queries it, and the guard blocks any payee that doesn't match the seller's record.

Hacky bits: the test USDT has no version(), so we recovered its EIP-712 domain from DOMAIN_SEPARATOR. Hedera payments expire 120 s after signing, so our facilitator rejects stale ones at verify instead of failing at settle.

Claude Code was the coding assistant and R&D tool; see AI_USAGE.md.

background image mobile

Join the mailing list

Get the latest news and updates