Loops Housenear-preflight

NEAR HACKATHON
Links
Team
1 member- CYOwner
Cyril Moron
Overview
A spending cap stops an AI agent from spending too much. It does not stop a prompt-injected agent from spending a little on a token it can never sell.
near-preflight is a guard on NEAR that an AI trading agent cannot skip. The agent holds no key on Base, the chain it buys on: it can only ask a NEAR contract to check a token and an amount. Three off-chain sentinels simulate the buy and then the resale on real Base state, look up whether earlier pools of the same token code were drained, and vote allow, warn or block. On two matching votes of three, the contract builds the swap itself (route, recipient, floor) and NEAR Chain Signatures signs it. A block signs nothing and quarantines the token for every agent. Every verdict is stored on NEAR with the hash of its evidence, and anyone can replay it without an account or a key.
NEAR is the enforcement point: roles and function-call keys, the vote quorum, budgets and caps, and the only signer of the EVM transaction (Chain Signatures). The demo agent's model runs in a NEAR AI Cloud enclave and its attested decision is tied to the check.
What runs today: a demo guard on NEAR testnet (27 checks, 13 blocked, 10 buys signed, none on a block); a second guard with no access key at all, whose buy, sale and withdrawal were mined on Base Sepolia; an inert guard on NEAR mainnet with the same reproducible build. ./verify.sh checks all three from public nodes in ten seconds. The verifier was measured on 96 real Base launches.
Limits, stated in the threat model: Uniswap V2 pools on Base only, about 30 s per verdict, three sentinels run by one operator, and it does not stop what a token does after the buy.