Loops HouseCroft

NEAR HACKATHON
Team
1 member- AROwner
Arpit Srivastava
Overview
What we built Croft is a runtime security oracle based on custom AI based decision model inspired from JEV for NEAR and Ethereum. Before a protocol or agent moves funds, it calls Croft and gets a verdict: allow, warn or block. Verdicts land in an on-chain oracle contract, and pre-auth lets Croft sign one exact call so it still runs in a single transaction guaranteeing that the transaction wont cause any harm to the protocol or users.
The problem Audits and bug bounties end at deploy; new attacks don't. Watch-and-pause monitors must win a race, and 56% of DeFi attacks on Ethereum went through private mempools those monitors never see.
Our custom decision model, inspired by Jev Like Jev, Croft turns raw chain state into a typed decision, not generated text. Each transaction becomes a fact card: calls and callbacks, who is calling, state changes, priced value flows and, on NEAR, the receipt graph.
- NEAR: an Isolation Forest (300 trees, up to 2,048 samples each) trained only on 69,863 normal Intents transactions, split by time, with 17,772 for calibration and 12,463 sealed for testing. It reads 63 receipt-graph features plus 12 rules such as failed resolve callback and credit kept after refund. Alerts are capped at 1 in 10,000 normals (high) and 1 in 1,000 (medium). The frozen model is hash-checked on load.
- EVM: gradient boosting over 49 features (depth 3, 300 iterations), trained on 4,443 transactions incl. 351 exploits, plus a review stage.
- Gray-zone cases go to a human.
Results: 23/23 October exploit txs flagged in hindsight, 0 high alerts on 7,400 clean test txs, and 94.9% of EVM exploits caught at 95.4% precision on sealed tests.
Why NEAR NEAR's asynchronous receipts hide its exploits: a failed callback can leave credit behind after a refund. Croft is built on that receipt graph, with Rust NEAR contracts, Ed25519 pre-auth and function-call keys that let an agent's key call only pay.