Solana program · devnet
Spending limits for AI agents, enforced by Solana.
A human signs a mandate: who the agent may pay, how much per payment, how much per day, until when. Funds sit in a vault with no private key. The agent can only ask; the program decides.
The problem
One poisoned web page can drain an agent's wallet.
The key is the money
An agent that pays for things needs a private key. Whoever controls the key controls the funds.
Agents can be manipulated
Hidden text in a web page looks exactly like an instruction from the user. Models follow it.
Payments are final
On-chain transfers settle in seconds. There is no chargeback and no one to call.
A rule in the prompt is what injection attacks. A check on your server is skipped by whoever compromises it. The rule has to live somewhere the agent cannot reach.
How it works
The agent requests. The program decides.
- ✓ not revoked
- ✓ not expired
- ✓ amount ≤ per-payment cap
- ✓ merchant on allowlist
- ✓ 24h spend ≤ daily cap
| Rule | What it means | What it stops |
|---|---|---|
| Merchant allowlist | Only addresses the human named can be paid | Paying an attacker |
| Per-payment cap | e.g. at most 1 dUSDC per call | One large theft |
| Rolling 24h cap | e.g. at most 5 dUSDC per day | A slow drain of small payments |
| Expiry | The mandate stops paying after a date | Forgotten permissions |
| Instant revoke | The owner can stop it at any time | An attack in progress |
“Even if the agent is manipulated, its server compromised and its signing key stolen, funds cannot move outside the mandate.”
| Attacker has | So they control | What still holds |
|---|---|---|
| Prompt injection | The agent's decisions | Allowlist and caps |
| Compromised server | The agent's code and config | Allowlist and caps |
| Stolen agent key | Valid signatures for pay | Allowlist and caps |
| Rogue agent operator | Everything off-chain | Owner can revoke and withdraw |
Live on devnet
Don't take our word for it. Check the chain.
- Demo mandate
- 9DhK5YJr7u754D4d6YLPedi8bPmM9tJ9JsXcibDVxxrH
- Approved: pay merchant A
- View transaction ↗
- Rejected: pay the attacker
- View failed transaction ↗
The demo uses dUSDC, our own devnet test token. It has no value.
Built with
Boring, proven parts.
- Solana
- Anchor
- SPL Token
- MCP
- x402-style 402 flow