QuotaPay

Manage your DAO by chatting with it. Authority is enforced onchain, so the agent can't overstep.

QuotaPay

Created At

ETHGlobal Mumbai

Project Description

Running a DAO today is operational drudgery: onboarding members, removing them, paying contributors, voting on proposals and managing a treasury, all through multisig rounds, spreadsheets and manual scripts. The obvious fix is an AI agent that does it all from plain language. The obvious problem is that an agent with a private key can be talked into misusing it. A single malicious forum post, invoice or pasted “member request” can inject instructions the agent obeys, and guardrails that live only in the agent’s prompt can be talked around.

The idea. Give the agent real on-chain authority, but make the contracts, not the model, the thing that bounds what can happen. The agent acts through a smart-contract account that inspects every transaction batch before it executes and rejects anything outside its mandate. Sensitive actions need a second key: the admin co-signs membership changes, and big moves require an actual member vote. A fully compromised agent (leaked key, hijacked model, hostile prompt injection) can’t exceed its caps or perform actions outside its mandate. The worst case is bounded by the account, not the model. We tested this live: a booby-trapped transaction built to dodge every off-chain filter is rejected at validation with out of policy.

How we made it. A Next.js console where you describe a DAO in one sentence and get three contracts (treasury, agent account, asset registry) plus a gas paymaster, so members never pay fees. A cloud worker turns chat prompts into typed, inspectable plans, never raw transactions. Execution happens as EIP-8141 frame transactions, a draft account-abstraction standard where the agent’s contract account is itself the sender. Validation reads the on-chain policy registry, which the canonical EIP-8141 mempool rejects. Our validation prefix needs about 175k gas against the 100k canonical cap, so it only admits on a sidecar with a raised validation budget. The treasury’s swap path is wired to Uniswap v4, and member identities are hiding commitments. Everything displayed is read live from the chain, and empty treasuries say “unfunded” instead of showing fake numbers.

What can happen with it. Small collectives, grant programs and hackathon treasuries can be operated by non-technical people in plain words (pay contributors, invite members, buy assets, open votes) while members inspect every limit on-chain. The same pattern generalizes: any AI agent that moves money should carry its mandate in a contract, not a prompt.

On hacks, honestly. Prompt injection against the chatbot still works sometimes, and we keep specimens and test them. What doesn’t work is turning that into theft: recipient addresses resolve from the on-chain registry (never from prompt text), and the validation scan only allows pre-approved contract calls. The remaining risks are stated plainly: within its mandate the agent can still misuse funds up to its caps, and vote choices are public even when voters are private. These are documented design trade-offs.

Status. Working devnet demo. Contracts are unaudited, and EIP-8141 and its companion standards are still drafts. The roadmap is a governed path to mainnet: audited contracts, encrypted ballots, and policy tables members can read without trusting us. future plans are to create a MCP server and improve piracy angle

How it's Made

Contracts (Solidity 0.8.28). DaoCore is the treasury and the rulebook. It enforces per-transaction and per-period spend caps and runs three authorization tiers:

Tier 1: the agent acts alone (small spends, allowlisted asset buys). Tier 2: needs an admin EIP-712 signature over the exact params, bound to chain ID, contract, nonce and expiry (membership changes, pause). Tier 3: needs a member vote with quorum and deadline (over-cap actions, policy changes).

AgentAccount is the agent’s on-chain body and is tx.sender for every agent action. Its VERIFY frame checks the signature, then scans every SENDER frame’s target and selector against a policy table and reverts out of policy at validation. Only DaoCore can write that table, and only after a vote. A factory deploys the core, agent account and asset module in one transaction. One shared gas paymaster sponsors fees for any DAO that allowlists it.

Frame transactions (EIP-8141, draft). Every agent action is a frame transaction submitted with eth_sendFrameTransaction: VERIFY(AgentAccount) → DEFAULT(paymaster.charge) → VERIFY(paymaster) → SENDER(DaoCore.*)

The validation prefix measures about 175k gas (the policy scan alone needs 100k), above the 100k limit the public relay enforces. We run a self-hosted ethrex sidecar with a 500k validation budget and BN254 precompiles, which is what makes in-validation policy checks and on-chain ZK verification fit.

Agent pipeline. The prompt goes through a regex screen (a first filter only), then an LLM (OpenRouter, temperature 0, JSON mode) that extracts a typed action. A deterministic parser re-canonicalizes it, so the model can’t invent authority. Recipients resolve from the on-chain registry, never from prompt text. The plan compiles to exact calldata, the admin signs in the browser for tier 2 and up, and the server builds and submits the frame transaction with the agent key.

Layers, outside to in: typed parser → registry-resolved recipients → admin signature → route allowlist → VERIFY policy scan → caps and tiers re-checked at execution. The server holds the agent key, so we assume it can be compromised. The contract bounds the damage, not the server.

Uniswap v4. DaoSwapModule does exact-in swaps with allowlisted pools, deadlines and slippage bounds, and the output is locked to the DAO address. TreasuryFundHelper lets anyone donate ETH that auto-swaps to USDC into a treasury. No testnet has v4 on our chain, so the devnet runs predeployed replayed-mainnet v4 contracts with a seeded WETH/USDC pool. A swap has been verified on-chain end to end.

Privacy (add-on). Members are Poseidon commitments in a Merkle tree. Two Groth16 circuits (Membership, DaoVote) hide who voted, and paymasters only sponsor proof-backed calls. Amounts, recipients and vote choices stay public.

Stack. Next.js 16 and React 19, with viem reading everything live from the chain (empty treasuries render “unfunded”). Neon Postgres holds conversations and the intent queue. A Dockerized agent worker runs on a VPS, rebuilt by CI. 162 tests pass.

Splitting the factory into child factories to stay under the 24KB contract limit. One shared paymaster, because per-DAO paymasters aren’t discoverable on-chain. The whole contract stack redeploys with one command.

background image mobile

Join the mailing list

Get the latest news and updates