Loops HouseReins

NEAR HACKATHON
Links
Team
1 member- AROwner
Arpit Singh
Overview
Problem: AI agents now pay for APIs, data and compute, but the options are bad. Give an agent a funded key and one prompt injection drains it (Freysa lost $47K, AIXBT lost 55 ETH); approve every payment by hand and the agent is pointless.
What we built: Reins, spending limits for AI agents enforced by a NEAR smart contract. The owner keeps funds in a contract vault and gives each agent a "rein": a budget per period, max per payment, approval threshold, merchant allowlist, expiry and use count. The contract checks every rule on the rein and its parent reins before any money moves, and rolls back on failure. Payments above the threshold become on-chain requests the owner approves. Agents can hand narrower sub-reins to sub-agents but never mint new allowance. A shared, bonded scam blocklist protects every owner. An agent-side guard scores each receiver and screens the text behind a payment for prompt injection; an MCP server plugs it into Claude Code and Codex, and a web console turns plain English ("0.5 NEAR a day, max 0.1 per payment") into contract terms.
How NEAR fits: the agent holds a NEAR function-call access key that can only call the pay methods and cannot attach a deposit, while every owner method requires one, so the agent can never withdraw, raise its limits or approve itself, enforced by the protocol, not a server. The same rules cover NEP-141 stablecoins and payments on other chains: the contract builds the EIP-1559 transaction and only then asks NEAR Chain Signatures to sign it. Agents can also get their own named sub-accounts. All of it is live on testnet, with an internal security review (13 findings, critical ones fixed), 75 contract tests, and a demo where an injected agent's 8 drain attempts all fail.