SENTINAL
Autonomous multi-chain DeFi risk monitor with DON-signed reports and circuit breaker protection
What it is
SENTINAL is an autonomous DeFi health monitoring system that watches $4.42B in real reserves across Aave V3 (Ethereum, Arbitrum, Base) and Lido stETH every 60 seconds using a 10-step Chainlink CRE workflow.
The Problem: Existing DeFi monitoring tools are centralized (run on AWS), reactive (alert after damage is done), single-chain, and use public thresholds attackers can simulate. Terra Luna ($40B), Euler Finance ($197M), and Wormhole ($320M) all had visible warning signs that no automated system caught in time.
How SENTINAL Works:
Every 60 seconds, a CRE CronCapability triggers the workflow. It reads live reserve data from Aave V3 smart contracts across 3 chains via batched Multicall3 EVM calls, cross-references against DeFiLlama TVL using DON median consensus across 10 nodes, detects utilization velocity spikes by comparing current vs previous cycle values stored onchain, and identifies cross-chain contagion when 2+ chains spike simultaneously. The risk engine produces a 0-100 score. A DON-signed 9-field report is written to ReserveOracleV2 on Sepolia — every report cryptographically bound to the policy version via policyHash attestation. Discord alerts fire automatically on Step 10.
The Circuit Breaker: SentinalGuard is an onchain circuit breaker any DeFi protocol integrates with 3 lines of Solidity. One require(GUARD.isSafe(address(this))) in the deposit function. When SENTINAL detects CRITICAL risk, deposits freeze automatically — no multisig, no human, under 60 seconds.
Key stats: 9 CRE capabilities active every cycle, $4.42B real mainnet data (not testnet mock), 22,000+ onchain checks completed, both contracts verified on Sepolia.
How it Works
CRE Workflow (TypeScript, @chainlink/cre-sdk):
- CronCapability: triggers every 60 seconds autonomously
- EVMClient: 7 batched Multicall3 calls reading Aave V3 getReserveData() across Ethereum, Arbitrum, Base + Lido stETH
- HTTPClient: DeFiLlama TVL API with DON median consensus (consensusMedianAggregation)
- HTTPClient (Call 8): raw eth_call to Sepolia to read previousUtilizations() for velocity detection
- runtime.getSecret(): confidential policy thresholds via Chainlink secret store
- runtime.report(): DON-signed 9-field ABI-encoded report with policyHash binding
- EVMClient.writeReport(): lands DON-attested report on Sepolia (gasLimit 1,000,000)
- HTTPClient: Discord webhook alert on Step 10
Smart Contracts (Solidity, Sepolia):
- ReserveOracleV2: receives DON-signed reports via onReport(), stores 9-field data, emits 4 events per tx, calls SentinalGuard to update severity
- SentinalGuard: circuit breaker with isSafe(address) gating, global/per-protocol pause, VelocityAlert events, 3-line DeFi integration interface
Dashboard: Next.js 14, TypeScript, Tailwind CSS — live Sepolia data, velocity charts, guard status panel, vault demo card
Stack: TypeScript, Solidity Node.js, Next.js, viem, @chainlink/cre-sdk, Multicall3
Links
Created by
- DHRUV PANCHOLI