All projects

SentinelVault

Autonomous vault that monitors DeFi positions and prevents liquidations automatically.

Risk & Compliance DeFi & Tokenization Privacy

What it is

SentinelVault is an autonomous DeFi risk protection system that monitors Aave V3 lending positions across multiple blockchains (Sepolia and Base Sepolia), fetches confidential market intelligence via Chainlink Confidential HTTP, scores risk using a deterministic engine, and executes protective actions atomically — all orchestrated by a Chainlink CRE workflow.

The Problem: DeFi lending users face liquidation risk across multiple chains. Manual monitoring is impractical — positions can become dangerous within minutes during market volatility. Existing solutions are single-chain, reactive, and lack privacy for market data access.

How It Works:

  1. A CRE cron trigger fires every 5 minutes
  2. The workflow reads Aave V3 positions from Sepolia and Base Sepolia simultaneously (multi-chain EVM read)
  3. It fetches market data via Confidential HTTP — the CryptoCompare API key is stored in the Vault DON using threshold encryption, injected inside a secure enclave, and never exposed to node operators
  4. A deterministic risk engine scores positions based on: health factor, LTV utilization, multi-chain concentration risk, and market sentiment (0-100 scale)
  5. Based on the score, CRE calls writeReport() to the SentinelVault contract on the worst-performing chain
  6. The vault's onReport() executes the protective action atomically in one transaction: Aave withdraw → DEX swap → Aave repay
  7. Actions scale with severity: HOLD (safe), REBALANCE (25% deleverage), DELEVERAGE (50% deleverage), EMERGENCY_EXIT (full position closure)
  8. All assessments are logged to a SentinelRegistry contract on Sepolia for full onchain audit trail

What makes it unique:

  • Multi-chain: monitors and protects positions across different L2s simultaneously
  • Atomic: withdraw, swap, and repay cannot be separated or front-run
  • Confidential: API credentials never leave the secure enclave (Chainlink Confidential HTTP)
  • Deterministic: pure math scoring with no AI/LLM randomness — every DON node reaches the same result
  • Self-healing: positions are automatically protected without human intervention

How it Works

Smart Contracts (Solidity + Foundry):

  • SentinelVault.sol: Implements Chainlink IReceiver interface. Deployed per-chain. Receives CRE reports via onReport(), executes Aave V3 withdraw → DEX swap → Aave repay atomically. Supports EMERGENCY_EXIT, DELEVERAGE, REBALANCE, and HOLD actions. Includes MEV slippage protection, Chainlink price feed integration, and graceful swap fallbacks for testnets.
  • SentinelRegistry.sol: Implements IReceiver. Stores all risk assessments as an onchain audit log on Sepolia.
  • SimpleMockDEX.sol: Testnet DEX implementing Uniswap V3 SwapRouter interface for reliable testnet swaps.

CRE Workflow (TypeScript + @chainlink/cre-sdk):

  • Cron trigger (every 5 minutes)
  • Multi-chain EVM read via EVMClient (Sepolia + Base Sepolia Aave V3 pools)
  • ConfidentialHTTPClient for CryptoCompare market data (API key in Vault DON)
  • Deterministic risk scoring matrix (health factor × LTV × multi-chain concentration × market sentiment)
  • writeReport() to SentinelVault on worst chain + SentinelRegistry on Sepolia
  • Consensus via consensusIdenticalAggregation for market data

Frontend (React + Vite + TailwindCSS):

  • Real-time position monitoring across both chains
  • Risk score visualization and health factor gauges
  • CRE pipeline flow diagram
  • Action history from onchain events

Testnets: Ethereum Sepolia, Base Sepolia
DeFi: Aave V3 (testnet deployments)

Links

Created by

  • Deebhika Kumaran
  • Md Athar Jamal Makki