The problem we picked
A venue commits money before it knows what it needs. The food order and the supplier deposit both go in days early, and the deposit is the bigger number: on our demo venue it lands somewhere between $100 and $190 depending on how the night looks. Guess low and you turn people away at the door. Guess high and you have paid for food you will throw out.
What the owner is guessing at (who plays, who wins, how hot it gets) is already priced, live, every day, in Gemini's prediction markets. Game markets for the local teams, a high-temperature market for the city. Nothing in a venue's stack reads them.
So we built the thing that reads them, and then ran into the harder problem: letting software spend money without handing it the keys.
What it does
Every morning the agent pulls the Gemini markets that matter to one venue and turns them into expected covers against a normal day for that weekday, factor by factor. The forecast is deterministic, so any decision can be replayed from the same inputs.
Then the plan splits by what the agent is allowed to do.
A $25 shift bonus sits under the $30 per-send cap, so the agent pays it and nobody is asked. On the day we recorded the demo the supplier deposit came out at $102, over the cap, so it became a proposal in the owner's inbox and nothing moved until the owner approved it.
The same day is also the clearest thing in the video. The agent had already spent $100 of its $150, so halfway down one plan the bonuses stopped paying straight through and started needing approval instead. The contract decides which of those two happens. Not the agent, and not the prompt.
Each payment's memo carries the market and the odds that justified it, so the reason sits on-chain next to the money.
Where we think the contribution is
Per-payment caps are commodity. Circle, Coinbase, ACP and x402 all have them. The part we could not find elsewhere is where the rolling daily total is enforced.
Across the agent payment protocols with public specifications as of November 2026, a cumulative multi-payment budget is either declared out of scope, defined as a constraint with no specified holder of the running total, or enforced inside a provider's own backend. Stableplan keeps it in the settlement contract, so the check and the transfer are the same transaction, and anyone can re-derive both from chain state.
npm run attest is that claim made checkable. It reads the day's agent spend back out of the event log, sums it, and asserts the total equals the contract's own counter, that every send is inside the per-send cap, that the day is inside the daily cap, and that the cap minus the total equals remainingToday. A judge does not have to trust our dashboard.
script/refusals.sh is the other half of that. Four eth_calls against the deployed contract: the agent over its per-send cap, the agent approving its own proposal, a stranger sending as the agent, and a payment to a username nobody has claimed. Each comes back with the contract's own error, and nothing is signed to run it.
One thing we did not expect to find: AP2 has no revocation primitive. A case-insensitive search for revok|revoc across its specification and its agent authorization docs returns nothing. Its only mitigation is short mandate lifetimes, so a 24 hour mandate is 24 hours of authority you cannot stop. Ours is one transaction, authorizeAgent(address(0)), and it applies to every token at once.
One primitive, three relationship shapes
All three are on chain on Arc testnet right now:
Business to business. The venue's supplier deposit. Over the cap, so the owner approves it. Business to person. Four shift contractors paid by @username, inside the caps, no human in the loop. Person to person. npm run p2p sends from the sender's own balance, which is why it consumes none of the agent's budget. The daily cap bounds the agent, not the account owner.
How we built it
Contracts in Solidity with Foundry, on Arc testnet (chain 5042002). UsernameRegistry resolves a name to an address and reverts on an unclaimed one, so the agent cannot pay an address nobody has claimed. Stableplan holds the authorization: one agent per user, a per-send and a per-day cap per token, both starting at zero, a packed day-plus-amount counter where the day is block.timestamp / 1 days, and proposals for anything the agent cannot send itself. The contract holds no balance and has no owner.
41 Foundry tests, four of them fuzzed at 256 runs, including the UTC day boundary with an explicit 23:59:59 to 00:00:01 case, because a cap that silently resets early is not a cap.
The agent is TypeScript and viem, 25 tests. It reads limitOf and remainingToday on chain, routes each payment on the same rule the dashboard displays, and simulates every transaction before sending it. Keys live in the macOS Keychain and a Foundry keystore, never in files or argv.
One QuickNode Stream on Arc testnet, filtered to the contract's four payment events and HMAC verified at the webhook. Arc produces a block about every half second, so the batch arrives nested three deep. The dashboard also backfills from the chain at boot, so it opens on the real transaction history rather than whatever happened to arrive since the process started.
Why Arc
Gas is USDC. A line cook receiving a $25 bonus never has to buy a gas token first, and every fee is already denominated in dollars. That removes the step that usually kills this kind of payout for people who do not hold crypto.
What is real, and what is not
Real: the contracts, every payment and proposal, the caps and the revocation, the Gemini odds, the Stream, the attestation, all three relationship shapes.
Not real: the consumer phone app on the home screen is a prototype running on local state. Its wallet module connects to MetaMask or Phantom but does not sign, and its personas have no usernames on chain. Person to person is proven through the CLI against the deployed contract, not through that screen.
Worth saying plainly: Gemini market liquidity is thin. Austin's high-temperature market traded $323 in 24 hours on 2026-11-17, so we treat the prices as a forecast signal rather than pretending it is a deep market. And the uplift coefficients are owner-set priors. They are not fitted to any venue's history, and that is the weakest joint in the project.
What we would build next
Fit those coefficients to a venue's own POS history, which is the only thing that would turn the forecast from a plausible prior into a measurement.
Then the generalization we actually believe in. Supplier payments are a measured $28B and B2B settlement $137B to $153B from January to August 2026 (Allium), and B2B has the highest cross-border share of any segment at 43 percent. We are not claiming the bar market. We are claiming the deposit, and a cross-border supplier deposit is the same transaction with a longer settlement path on the other side.
Team
Huu Tai Le, contracts and agent. Charlie Sneed, app and design.
Built With
- arc
- foundry
- gemini-prediction-markets
- next.js
- node.js
- quicknode-streams
- solidity
- tailwind
- typescript
- usdc
- vercel
- viem
