All projects

Sentinel Precog

AI-powered predictive security oracle that prevents DeFi attacks before execution

CRE & AI Risk & Compliance Tenderly

What it is

What is Sentinel Precog?
Sentinel Precog is a decentralized, AI-powered security oracle that PREDICTS and PREVENTS DeFi attacks BEFORE they happen - not after.

The Problem
DeFi protocols lost $3.8B to hacks in 2023-2024. Current security solutions only detect attacks AFTER execution - when funds are already gone. Most exploits complete in a single transaction (~3 seconds).

How It Works
Sentinel Precog uses Chainlink CRE to:
 1. Monitor Mempool - See pending transactions before they're mined (Blocknative API)
 2. Simulate Transactions - Predict outcomes using Tenderly simulation
 3. AI Threat Analysis - GPT-4 analyzes patterns, matches known exploits, calculates risk scores
 4. Preemptive Action - Automatically blacklist attackers and pause protocols via on-chain smart contracts

Architecture
 Mempool → CRE Workflow → AI Analysis → Risk Score → On-chain Protection

        ↓              ↓

     Blocknative      OpenAI GPT-4 + Tenderly

        ↓              ↓

     Chainlink DON     SentinelReceiver Contract

        ↓              ↓

     Base Sepolia      RiskRegistry + MockProtocol

How it Works

Tech Stack
CRE Workflow (Go)

  • github.com/smartcontractkit/cre-sdk-go
  • Cron trigger for periodic monitoring
  • HTTP capability for external APIs
    External Integrations
  • Blocknative API: Mempool monitoring & gas prices
  • Tenderly API: Transaction simulation
  • OpenAI API: GPT-4 Turbo for threat analysis with agent reasoning
    Smart Contracts (Solidity)
  • SentinelReceiver.sol: Receives CRE reports via Keystone Forwarder
  • RiskRegistry.sol: Stores risk scores, manages blacklist
  • MockProtocol.sol: Demo protected DeFi protocol
  • Deployed on Base Sepolia testnet
    Architecture Flow
  1. CRE workflow triggers every minute
  2. Fetches pending transactions from mempool
  3. Simulates each transaction via Tenderly
  4. AI agent analyzes patterns with 5-step reasoning chain
  5. Generates risk score (0-100)
  6. High-risk: Submits report to SentinelReceiver
  7. Contract blacklists attacker & pauses protocol
    Files using Chainlink CRE:
  • workflow/workflow.go (main CRE workflow)
  • workflow/main.go (entry point)
  • contracts/src/SentinelReceiver.sol (receives Keystone reports)

Links

Created by

  • Arjun