Skip to content
← works

works

Sentinel-V4

LIVE

AI security patrol for DeFi contracts: six semantic analyzers find logic vulnerabilities, and both F1 figures are reported side by side.

AI security patrol for DeFi contracts: as soon as a new contract goes on-chain, scan it first, then have AI read it again to look for logic vulnerabilities, and prepare "how to attack" in advance.

What this is

Slither (an open-source static analysis tool) is the foundation, with six semantic analyzers layered on top, each targeting one category: permissions, economic model, Uniswap V4 Hook, oracles, cross-protocol, and governance; these then go to LLM modules routed by category, for a total of 42 detectors and an 8-step pipeline. The execution side is designed as a flash loan (borrow, use, and repay complete in the same transaction; if no profit can be made, the whole transaction is voided) and executes within four seconds.

What problem it solves

Most DeFi contracts that get hacked have been "audited." Static tools catch syntax-level vulnerabilities (such as reentrancy), but the truly fatal ones are at the semantic layer: economic-model miscalculations, oracle manipulation (first use a large order to push the quoted price off track, then borrow at the distorted price), and cross-protocol coupling.

Use cases

A new contract is deployed on-chain → five layers of filtering first block what is not worth examining (standard tokens, known contracts, too-simple cases) → scan → if there is an exploitable vulnerability, store the attack payload and simulation results → execute when market conditions are ripe. Scanning one contract takes about 11 seconds and $0.006.

Highlights

  • Both F1 numbers reported together: real-sample F1 = 0.63 (23 contracts, Precision 0.67, Recall 0.60), below the 0.70 production bar I set; regression baseline F1 = 1.00 is a regression-prevention gate score, not accuracy. The demo site puts the two numbers side by side.
  • The embarrassing cell is also shown: Recall for the logic-error category is 0, while this category accounts for nearly half of real attacks. That result is what later forced the six semantic analyzers into existence.
  • The ECG of five backtesting rounds: 0.769, 0.000, 1.000, 0.706, 0.632. Handcrafted samples score perfectly; add real contracts and the score falls; the zero round occurred because the compiler version did not match, and the entire pipeline silently returned "no findings."

Where it stands now

About 175,000 lines, about 1,700 tests, and one executor contract on Sepolia testnet. In reality, it was a high-intensity sprint of about ten days in February 2026; it has never been deployed on mainnet, and the arbitrage has never run on real funds. The math has been done: the bottleneck is not scanning cost, but how many vulnerabilities can be cashed out in a single flash-loan transaction. The demo site is viewable; the data is simulated.