GAINZGuard AI NEAR ZK
GuardVault ↗source ↗live state
testnet · …ipfs …

Your agent's spending policy is not a loss bound.

GAINZ attacks the policy an AI agent is allowed to follow, finds the sequence of legal actions that breaks it, and puts a number on the worst case. Enforcement lives in the onchain GuardVault; the evidence lives in a reproducible report you can anchor on NEAR.

7hard checks the contract runs before any transfer
9policy rules in the Rust/TS engine behind the range
CIDv1audit trail + report hash
Rust ⇄ TSone policy engine, byte-identical hashes

Policy

policy.json
5 NEAR
10 NEAR
4 / hour
100 bps
Spending window
Allowlist
fenceline-api-8t1bk.testnet
Assets
NEARUSDCZK required
Policy commitment37003745447969964f053849d5bde120…

GAINZ range

idle

Pick a policy and run the range.

Enforcement console

guard_vault

Every click runs the same policy engine the MCP server uses: nine rules, the live allowlist and the caps of GuardVault. An approval returns an IPLD audit CID and a Noir proof hash; the onchain limits are read from testnet below.

Remaining in window—

No actions yet. Try a payment, then try the injection.

Live on NEAR testnet

connecting

Querying rpc.testnet.fastnear.com…

1 · Enforce

The agent holds a function-call key scoped to GuardVault, which checks the caller, the allowlist, the per-transaction cap, the 24h window, the CID format and a non-empty Noir proof before it moves a single yoctoNEAR. It cannot edit the policy, and it never touches the vault balance.

2 · Attack

The range replays split transfers, day-boundary flushes, maximum-slippage swaps and injection probes. It only uses actions the policy allows, so anything it finds is a policy bug, not a broken rule.

3 · Prove the bound

The analytic bound is closed form and the search is deterministic, so the same policy and seed always produce the same report CID. Anchor that hash on NEAR and the claim stops being a screenshot.