Sentinel CRE
What it is
Sentinel is an autonomous, AI-driven security guardian for DeFi vaults. It bridges the gap between high-speed on-chain activity and intelligent risk assessment by combining the Chainlink Runtime Environment (CRE) with Google Gemini AI. Unlike static smart contracts, Sentinel acts as a "live" security analyst that monitors assets in real-time and executes autonomous defensive actions to prevent fund drainage.
The Problem It Solves
The DeFi ecosystem suffers from a "Reactive Security Gap." Currently, when a vault is exploited, the only defense is a human-triggered emergency pause. By the time a developer receives an alert and signs a transaction, the assets are usually gone.
- Speed of Attack: Flash-loan exploits happen in seconds.
- Static Logic: Traditional smart contracts can't distinguish between a "whale" making a large planned withdrawal and a malicious attacker draining liquidity.
- Manual Intervention: Current "kill-switches" rely on centralized multisigs or human availability, creating a single point of failure.
How It Works
Sentinel leverages a three-layer architecture to provide proactive defense:
- The Decentralized Eyes (Chainlink CRE): Using a Cron Trigger within the Chainlink Runtime Environment, Sentinel runs a persistent "Security Patrol." Every 60 seconds, the CRE workflow fetches live vault balances and transaction data across the network. Because this runs on a Decentralized Oracle Network (DON), the data is tamper-proof and verifiable.
- The Intelligent Brain (Google Gemini AI): Sentinel doesn't just look at numbers; it analyzes intent. The data is passed to Gemini 1.5 Flash along with user-defined risk thresholds (e.g., "Pause if more than 20% of funds move in one hour"). Gemini performs a subjective risk analysis, distinguishing between legitimate high-volume trading and anomalous exploit patterns.
- The Autonomous Hands (On-Chain Execution): If Gemini identifies a "DANGER" state, the CRE workflow automatically generates and signs a cryptographic report. This report is sent to the Sentinel Smart Contract on-chain, which validates the signature and instantly triggers the
pause()oremergencyShutdown()function on the target Vault.