Loops HouseTriagePay

NEAR HACKATHON
Team
1 member- YUOwner
Yura Khomenkov
Overview
AI agents are getting wallets, and one prompt injection turns "pay the invoice" into "pay the attacker". TriagePay is a payment firewall for AI agents on NEAR: the agent signs, the contract decides.
The agent never holds a normal key. It holds a NEAR function-call key that can only call pay() on a policy-wallet contract. The contract enforces a payee allowlist, a per-call cap and a daily cap on chain, holds larger payments for the owner to approve, and lets the owner revoke the agent at any time. The wallet account itself has no keys, so nothing in the agent's prompt or code can lift those limits.
It is live on NEAR mainnet: a factory (triagepay.hlpok1lad.tg) creates policy wallets, and 166 graded on-chain assertions cover paid, held, approved, refused and revoked payments. We hijacked a NEAR AI Cloud model and told it to tip the attacker: the wallet refused all five payments on chain. In the public Drain Me playground visitors write their own injections: 14 attempts, 14 refusals, 0 drained.
The agent pays per call over HTTP 402 (x402) for Falsara, a live mainnet service that checks security findings, and the server verifies payment from the token contract's own receipt (native USDC on mainnet). A red-team review was remediated and documented in the repo.
Try it in 30 seconds without a wallet: https://triagepay-demo.vercel.app/ (press Launch the attack and watch NEAR testnet refuse the payment).