All projects

GuardAI

Autonomous DeFi vault that auto-withdraws your funds when systemic risk is detected via Chainlink CRE

CRE & AI Risk & Compliance DeFi & Tokenization Tenderly

What it is

GuardAI is an autonomous DeFi risk protection system that monitors systemic risk across major DeFi protocols in real time and automatically withdraws user funds before a crisis hits with zero manual intervention.

THE PROBLEM:
DeFi users are exposed to systemic risk events (ETH price crashes, Lido/Aave/MakerDAO TVL drains, protocol exploits) but have no automated protection. By the time they react manually, it's too late.

HOW IT WORKS:

  1. A Chainlink CRE workflow runs every 60 seconds, fetching:
      - ETH/USD price from Chainlink Data Feed (0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419)
      - Lido, Aave, and MakerDAO TVL from DeFiLlama
  2. A weighted Systemic Risk Index is computed on-chain:
      ETH price drop (30%) + Lido TVL drain (25%) + Aave TVL drain (25%) + MakerDAO drain (20%)
  3. The score is written on-chain every 60s via setRiskScore()
  4. If score >= 70, VaultSentinel automatically executes emergency withdrawal, returning ALL user ETH and ERC20 assets instantly, with no human trigger required.

WHAT IT SOLVES:

  • Eliminates the reaction-time gap in DeFi risk management
  • Protects users from systemic contagion events autonomously
  • Provides a live risk dashboard so users can monitor vault health in real time

How it Works

  • Smart Contract: VaultSentinel.sol (Solidity) — circuit breaker pattern with setRiskScore(), 
     deposit/withdraw for ETH + ERC20, and _executeEmergency() that sweeps all assets back to users
  • Chainlink CRE: vault-sentinel-workflow.yaml — cron-triggered workflow (every 60s) using 
     chainlink-data-feed step for ETH/USD price + HTTP steps for DeFiLlama TVL data, 
     JavaScript compute step for weighted risk scoring, and eth-transaction step to write on-chain
  • Frontend: Next.js + Tailwind CSS + Framer Motion — live Risk Gauge reading from contract, 
     Pools tab with deposit/withdraw UI, Portfolio tab, wagmi v2 for wallet + transaction management
  • Infrastructure: Tenderly Virtual Testnet (mainnet fork, ChainID 9991) for realistic simulation
  • Testing: Hardhat + TypeScript — simulate-attack.ts script to inject arbitrary risk scores for demo

Links

Created by

  • Fabian