Loops HousePaygate

NEAR HACKATHON
Team
1 member- CHOwner
Christopher Uba
Overview
AI agents are starting to handle money, and that creates a real risk: an agent that can pay can be talked into paying the wrong person. A single injected line in a document or job brief is enough. We built PayGate so businesses can give their agents a budget without trusting the agent itself.
Each customer gets a vault contract on NEAR that they own and that has no keys of its own. The agent holds one restricted key that can only ask the vault to pay. The vault decides, using rules the agent can't touch: approved payees, per-payment and daily limits, one payment per job, owner approval for larger amounts, and an emergency freeze. To test this, we hijacked our own agent and tried 12 ways to drain a vault with its real key. Every attempt was blocked on-chain, and the attacker received nothing.
Around the contracts (Rust, near-sdk 5.30, 53 tests) we built a full web app: wallet sign-in, one-click vault setup, a jobs workflow for creating, delivering and paying for work, and owner controls signed in the customer's own wallet. It supports NEAR and USDC budgets, cross-chain USDC payouts (mainnet only), a REST API and MCP server for agents, Slack, Discord and Telegram alerts, tamper-evident receipts, and closing a vault for a full refund.
NEAR made this design possible. Function-call access keys confine the agent to one method on one vault. Keyless sub-accounts and batched actions let our factory create vaults safely in one transaction. We also use NEP-413 sign-in, NEP-366 meta-transactions for gas, NEP-141/145 for Circle USDC, NEP-297 events, NEAR Connect, near-api-js, NEAR AI Cloud with attestation checks, NEAR Intents 1Click, near-sandbox, FastNEAR and NearBlocks.
Supporting tools: Node.js, Postgres, Playwright, Railway and Remotion. We wrote the code with Claude Code and reviewed it ourselves. PayGate is live on testnet at trypaygate.xyz and ready for mainnet, pending an independent audit.