Loops HouseClear to Pay

NEAR HACKATHON
Links
Team
1 member- JOOwner
Joseph Anyasi
Overview
Clear to Pay lets an AI agent pay supplier invoices on NEAR without being able to pay the wrong person.
The problem: AI agents now read invoices and move money, and they can be talked into it. In May 2026 Grok was asked to translate a Morse-code message; it was a transfer order, and Bankr sent about $175,000. Invoice fraud works the same way: one hidden line saying "bank details changed, pay the new account today".
The idea: the AI reads, code decides. A NEAR smart contract pays an invoice only when it clears: it matches the order, a delivery signed by two different people (for example storekeeper and weighbridge), the supplier's own signature, and a payout address registered days earlier. The address on an invoice is never used. Changing it needs the supplier's key, the buyer's approval and 72 hours. Each invoice gets an on-chain verdict: CLEARED (paid in seconds), HELD (what to fix) or SEIZED (nothing paid, the address flagged for other buyers).
The AI runs inside OutLayer's TEE on NEAR AI Cloud (experimental): hidden text is cut first, the reading is signed in the enclave, and the browser checks the signatures and attestation, then compares the reading with what the supplier signed. The AI never chooses who gets paid.
Built for non-technical teams, no terminal: the buyer signs an order once, signers and the supplier tap Sign on their phones, signatures reach the buyer's Inbox by themselves, and the buyer submits with a wallet. Telegram alerts for every decision. Judge mode lets anyone attack it live with no wallet.
Proof: 11 attack scenarios: two allowlist-style guards paid up to 9, Clear to Pay paid none. 392 tests, eight security reviews, live on testnet (guard.cleartopay.testnet), first real end-to-end payment in the browser on 8 Nov.
NEAR: smart contract, function-call keys, NEP-141 USDC, NEP-413, NEAR AI Cloud, OutLayer.