Loops HouseAgent Allowance

NEAR HACKATHON
Links
Team
1 member- ABOwner
Abdul Rahman
Overview
An AI agent that holds a wallet key can be talked into giving the money away. Prompt injection is unsolved, so Agent Allowance assumes the agent is already compromised and bounds what it can do.
The agent never holds funds. It holds one NEAR function-call access key that can do exactly one thing: ask a vault contract to pay, within limits the owner wrote as code — a per-payment cap, a rolling 24-hour cap, and a recipient allowlist.
That gives two independent gates. The first is the NEAR protocol itself: a function-call key is bound to one contract and one list of methods and can never attach a deposit, so NEAR's own nodes refuse a plain transfer, a call to another contract, or an attempt to rewrite the policy — refused before the transaction reaches a block, by the network and not by our code. The second gate is the contract, which evaluates every request against the policy and emits a NEP-297 event either way, so a denial is preserved on-chain alongside the injected text that caused it.
On most chains the first gate means deploying an account-abstraction stack. On NEAR it is a protocol primitive.
What is real: the contract is deployed and holding funds on NEAR testnet, including testnet USDC.e, a public token this project does not control, so the NEP-141 path runs against someone else's contract. Nine attacks run live against it, six refused by the protocol and three by the vault. Five recorded transactions replay from their own on-chain events. The agent's restricted key is published in the repository, so anyone can try to steal from the vault and watch it fail.
Stack: a Rust contract (near-sdk 5.30.1) with 40 unit and 14 sandbox tests, a static site, Python-stdlib tooling that signs its own transactions with no dependencies, and an MCP server so an agent can request a payment as a tool call.
Stated plainly: testnet only, unaudited, and a cap bounds a loss rather than preventing one.