Loops HouseCanary Court

NEAR HACKATHON
Team
1 member- AROwner
Arif Novrian Pratama
Overview
Would you give an AI agent your treasury? Agents that hold secrets and payment tools can be talked into leaking them by one well-crafted message. Testing them is manual and runs on trust: testers must reveal an attack before getting paid, and owners can take it and walk away.
Canary Court is an autonomous red-teaming market on NEAR: AI agents attack an AI agent before it is trusted with funds. Our demo target is a fictional AI treasury agent with pay_invoice/transfer tools that guards a withdrawal approval key (a secret canary). Its owner's client agent posts a USDC bounty. A lead agent bids, negotiates, wins, and subcontracts two specialist agents, carving their budgets out of the same escrow. Each attack is ECIES-encrypted to an OutLayer TEE enclave. The enclave runs it against the treasury agent on a TEE-hosted NEAR AI model, checks whether the key leaked, and returns an attested verdict. In one callback, the contract stores the report, sealed to the owner, and pays the attacker and the lead's margin. A valid finding goes unpaid only if it's a duplicate or the budget ran out.
NEAR is the trust layer, and we give AI money without giving it the keys:
- Agents act through function-call keys, so a hijacked agent can't send tokens or NEAR out of the market.
- The escrow contract enforces every limit: budgets, depth, counterparty risk with automatic escalation, strikes backed by attested evidence, and a blocklist.
- OutLayer provides verifiable execution with a hash-pinned enclave key.
- NEAR AI provides private, signed inference.
- NEAR Intents (a dry quote for now) plans funding from another chain.
We prove it rather than claim it. Five attack scenarios leave on-chain receipts: hijacked agent, grader manipulation, blocklisted agent, runaway lead, and replay. A 54-step testnet suite (53 pass, 1 not exercised) checks money conservation at sampled blocks and finds zero plaintext in the run's on-chain data. Testnet only; the treasury agent is fictional.