A compromised agent key should not drain the treasury.
Rampart is an on-chain gate. The key holds nothing. Capital sits in the program. The agent signs. The chain decides.
Devnet. No mainnet.
Own the agents. Keep the keys.
A compromised agent key should not be able to drain the treasury.
Rampart (@userampart) is an on-chain treasury gate for AI trading agents. The agent's wallet holds zero authority over the funds. Capital sits in program-owned accounts. The agent signs a request. The chain decides if money moves.
On Solana devnet, one click runs it. Eight actions land. Seven are rejected by the program, by name: PolicyNotEffective, PerTxCapExceeded, PriceDeviationTooHigh, DestinationNotAllowed, DailyCapExceeded, VaultFrozen, Unauthorized.
The same key that just spent cannot unfreeze itself. That is not a prompt. There is nothing it can say.
The wedge is not another allowlist. It prices the agent's size against a Meteora bonding curve before the money moves. The only band is 20% to 80%. Past 80%, the pool is too close to graduation. That path is 37 tests, green in CI. It is not live on the deployed program, and Rampart does not execute the swap.
Own the agents. Keep the keys.
https://t.co/xcPwxdDo5C
Give your trading agent a wallet. Then watch it lose your money anyway.
Here’s the scenario nobody prices in.
You build an autonomous trading agent. It runs on your infrastructure, holds a hot wallet, talks to Jupiter, and executes on-chain swaps forty times a day while you sleep. It has a risk module. It has guardrails. It has a config file that says max_position_size: 500.
Then one of three things happens.
> One: someone finds a prompt injection in whatever your agent reads - a token name, a memo field, a “support agent” output - and talks it into skipping the checks. Your guardrails live inside the agent. The agent is the thing that was compromised. It reads its own config, it calls its own functions, and it sails straight past the thing that was supposed to stop it.
> Two: your risk limits are correct but your price is stale. The oracle you’re pricing against last updated ninety seconds ago. The agent is reasoning about a market that has already moved, and it has no way to know the difference.
> Three: nothing is exploited at all. The agent simply has a bad quarter. It reasons its way into a position that’s too large, holds through a drawdown it never anticipated, and compounds six small correct decisions into one catastrophic one. Nobody attacked you. You just handed an optimiser your bank account and hoped.
Every existing answer to this is a library. AgentGuard, SolGuard, Sophia - middleware that runs in the agent’s process and wraps its transaction builder. Turnkey, Coinbase, Privy, Crossmint - custody providers that hold the keys themselves, so now you’re paying a stranger to keep your agent solvent.
Both have the same structural problem. The thing being constrained and the thing doing the constraining share a process, a memory space, and a threat model. When the agent is jailbroken, the guardrail is the first casualty because it lives inside the blast radius.
The key that just spent your money can't unfreeze the vault..
A few weeks back, I started building Rampart.
It's deployed on Solana devnet now, immutable, and submitted to Colosseum's Crypto World's Fair.
The idea in one sentence -> an AI agent trading your money shouldn't be able to move your money.
Here's why that's harder than it sounds.
Your agent gets prompt-injected. Some text in a token name, a website it scrapped, an API response, and now it believes it works for someone else. It signs a transfer. Money leaves. You find out from the explorer.
The fix everyone reaches for is a guardrail.
An allowlist, a spend limit, a policy module.
But most of those run somewhere the agent can reach. same process, same permissions, same key. You've built a fence inside the room you're trying to protect, and handed the person you don't trust the door.
Rampart puts the fence in the instruction.
Your agent's wallet holds zero authority.
Capital site in program-owned PDAs. The agent signs a request. The chain decides if money moves. When a guard fails, the transfer doesn't partially execute, doesn't lot a warning, doesn't get flagged for review.
It reverts, and the funds never leave the account they were sitting in.
Eight actions land on the demo. Seven are rejected by name:
> PolicyNotEffective
> PerTxCapExceeded
> PriceDeviationTooHigh
> Destination not allowed
> DailyCapExceeded
> VaultFrozen
> Unauthorized
A few of those matter more than the rest.
• PriceDeviationTooHigh, exists because agents don't know what things cost. They know what a feed told them. If the feed is stale, or the pool moved, the agent will happily size a trade against a number that stopped being true. So the band check runs before the spend, against the vault's reference, and if the deviation is past the threshold, nothing moves.
• VaultFrozen, exists because the obvious failure isn't a hack. It's you, at 3am, deciding to stop everything.
A freeze that can be lifted by the same key that triggered it is a freeze an attacker who gets that can lift. So the freeze is owner-only, and policy changes are time-locked. The spending key cannot unfreeze the vault. The key that just spent your money has no path to resetting the rule that stopped it.
That's the structural point. Your guardrail has to live outside the thing it's guarding, or it's decoration.
The program is deployed with --final.
Upgrade authority is the system program & cannot be set again. Which means I've locked myself out of my own contract. Whatever is in the binary is what runs, permanently.
That's the point if you're testing it with Capital, and that's why the next paragraph exists.
The bond curve is not live.
The wedge is pricing size against a Meteora bonding curve before the money moves, band 20% to 80%.
That path is tested and it's not in the binary. A DBC swap needs the pool authority to sign, and that authority is not handed over to the treasury. It needs a new program id.
What's left is a time-of-check window. The band is true at release, not atomic with the later swap. Caps, allowlist, and the owner freeze still bound what can move. the band, the part if most like to claim, is the part that isn't deployed.
I'm naming that in public 'cause a visitor who hits RUN and then find a silent limit would trust everything else less..
A few weeks back. Two instructions on One gate; I can't take back.
Own the agents. Keep the keys..
A compromised agent key should not drain the treasury.
Rampart is an on-chain gate. The key holds nothing. Capital sits in the program. The agent signs. The chain decides.
Devnet. No mainnet.
Own the agents. Keep the keys.