cd /news/ai-agents/how-we-let-an-ai-run-payroll-without… · home › topics › ai-agents › article
[ARTICLE · art-177882] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

How we let an AI run payroll without touching the money

A developer built PayWarden, a payroll system in which an AI assistant drafts payment runs but never holds funds or keys, submitting only a single proposeRun call that the employer must sign. Worker signatures on hours make prompt-injected or inflated pay lines impossible rather than merely capped, and each paid line mints a non-transferable ERC-721 payslip. An attack script on the Aevum testnet reported 71 of 71 attacks refused with zero wrong payments, and 10 of 10 genuine paydays paid with no false refusals.

recommendation

Replace spending caps with cryptographic preconditions: require worker signatures per pay line and give the agent a session key scoped to one proposeRun call so injected lines cannot be paid.

more in playbook: Securing agents and AI tools
by read3 min views3 publishedNov 28, 2026

Payroll is the most repetitive money job a small team has. Every week or month someone reads timesheets, matches names to wallet addresses, adds it all up and pays. It is exactly the kind of work you want an AI assistant to do.

The problem is the usual way to automate it: you give a bot a hot wallet. Then one poisoned timesheet, one prompt injection hidden in a file, or one wrong address, and the money is gone for good. A spending cap limits the damage, but it does not stop the attack.

For the QDay Aevum Builder Challenge I built PayWarden, payroll where an AI does the work and never holds the money. This post is how it works and what I learned. The whole design fits in one sentence: the worker signs the hours, the AI drafts, you sign the pay.

proposeRun. That is the only thing its key can do. It cannot approve, pay, withdraw or change its own limits. Between steps 2 and 3, the contract checks everything: every signature against the confirmed wallet, per-person, per-run and per-period caps, an expiry, an off switch, and that no line was already paid. Anything wrong reverts with a named error before a person ever sees it.

Most "safe agent" designs put a cap on the bot. A cap says: you can lose at most this much.

Worker signatures change the question. The AI cannot invent a line, inflate hours or add a payee, because it cannot produce the worker's signature. A prompt-injected line is not capped. It is impossible. And because the contract records paidLine[payee][period], the same signed line can never be paid twice, even across two different runs.

The assistant can also work through the employer's ERC-4337 smart account (EntryPoint v0.7, already deployed on Aevum). Its key becomes a session key that can sign exactly one call, proposeRun on one vault, until an expiry the EntryPoint enforces. The owner also caps the gas price and gas a session operation can use, so a stolen key cannot even drain the gas deposit.

The key holds no money and no gas. In the on-chain proof, its balance is zero before and after.

This is the part I am proudest of. Every time a line is paid, the vault mints a payslip to the worker in the same transaction. It is an ERC-721 token that cannot be transferred (ERC-5192), and only vaults created by the PayWarden factory can mint one.

So a payslip can only exist if the worker signed that line and the employer signed the payment. The metadata (amount, employer, vault, period, date) is built on-chain, and anyone can open paywarden.me/payslip/<number> without a wallet to check it.

Why this matters: remote workers paid in stablecoins often cannot prove their income. Bank statements do not show it, and a screenshot proves nothing. A payslip signed by both sides, on a public chain, does.

I wrote an attack script that builds a fresh vault on the Aevum testnet and throws everything I could think of at it, each attack as a real transaction:

Result: 71 of 71 attacks refused, 0 wrong payments. Every refusal is a failed transaction you can open on the explorer, with the exact contract error.

Refusing everything is easy if nothing ever gets paid, so the same script then runs ten genuine paydays: 10 of 10 paid, 0 false refusals, each minting one payslip per worker.

On top of that: 138 Foundry tests (unit, fuzz with 10,000 runs each, and invariants such as "a payee is never paid twice for one period" and "payslips issued always equal lines paid"), an internal security review with Slither and a manual checklist, and CI on every push.

MCOPY, so everything compiles for the Shanghai EVM, and its RPC limits log queries to 1,000 blocks. It is testnet only. If you run payroll for a remote team, I would love to hear what you would need before trusting something like this with real money.

── more in #ai-agents 4 stories · sorted by recency
── more on @paywarden 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-we-let-an-ai-run…] indexed:0 read:3min 2026-11-28 · —