Loops HouseNEAR Agent Spending Guard

NEAR HACKATHON
Links
Team
1 member- FIOwner
Fimas Wijaya
Overview
NEAR Agent Spending Guard is a counterparty check service for AI agents that pay. Before an agent signs a transfer or contract call, it queries this guard about the receiver. The guard returns allow, warn, or block with human-readable reasons, and the agent-side wrapper refuses to sign on block or asks a human on warn.
The scoring engine evaluates four signals: account age and activity, whether the receiver is a contract and whether its code changed recently, prior interaction history between the agent and receiver, and a shared community blocklist with evidence attached.
The agent signs with a function-call access key scoped to a single contract, never a full-access key. This limits blast radius: a function-call key cannot transfer NEAR directly, cannot add or delete keys, and is capped by its gas allowance. The guard is defense in depth on top of that constraint.
The attack demo shows a prompt-injected agent attempting to pay a blocklisted address (drainer.near), a fresh contract with code changed 1 hour ago, and a first-ever payee. All three are stopped before signing. A trusted recurring payee passes through cleanly.
Built with Node.js and NEAR RPC (query / view_account). 9 unit tests, live HTTP endpoint, and a reproducible attack demo. Built at NEAR HACKATHON.