ChainPilot AI

Autonomous AI Risk Intelligence for Web3

1) Inspiration

Web3 unlocks financial freedom — but it also exposes users to massive risk.

Every week, we see:

  • Smart contract exploits
  • Rug pulls
  • Malicious token contracts
  • DeFi protocol vulnerabilities

Despite billions lost annually, most users still interact with smart contracts blindly.

Even experienced developers struggle to:

  • Read raw bytecode
  • Interpret proxy patterns
  • Evaluate reentrancy risks
  • Simulate transactions safely

We asked a simple question:

What if Web3 had an AI co-pilot that thinks before you transact?

ChainPilot AI was built to become that autonomous security layer.

What It Does

ChainPilot AI is an AI-powered Web3 security and transaction intelligence platform that:

  • Converts natural language into blockchain actions
  • Performs static contract vulnerability analysis
  • Generates AI-powered human-readable risk explanations
  • Simulates transactions before execution
  • Logs audit hashes immutably on-chain
  • Monitors contracts continuously every 5 minutes

It’s not just a scanner. It’s an AI security operator.

How We Built It

🔹 Frontend

  • Next.js 14 + TypeScript
  • Tailwind CSS
  • Privy wallet authentication
  • AI chat interface powered by Gemini

🔹 Backend (Modular Service Architecture)

Built with Node.js + Express + MongoDB.

Six core services:

  • ContractAnalyzer → Static bytecode + source inspection
  • RiskEngine → Weighted vulnerability scoring
  • AiEngine → GPT-4o security explanations
  • TransactionSimulator → Pre-execution risk modeling
  • BlockchainLogger → On-chain SHA-256 audit logging
  • MonitoringEngine → Cron-based automated surveillance

🔹 Autonomous Agent

Built using ElizaOS framework.

The agent can:

  • PREPARE_TRANSFER
  • CHECK_RISK
  • CREATE_TEAM
  • Parse natural language into blockchain workflows

This transforms ChainPilot from a tool into an autonomous AI operator.

Smart Contract Design

We deployed an immutable audit registry (AuditLog.sol) on Sepolia.

Functions include:

  • logAudit()
  • verifyAudit()
  • totalAudits()
  • getAuditHashes()

Security Model:

  • Only a trusted backend logger can write
  • Audit hashes are immutable
  • Emits AuditLogged event for indexing

Each security report is hashed using:

H=SHA256(report_data)

This ensures cryptographic integrity and verifiability.

How It Works (Full Flow)

  1. User connects wallet via Privy
  2. User types: analyze contract 0x...
  3. Gemini parses intent
  4. Backend fetches contract bytecode
  5. riskEngine evaluates 15 vulnerability patterns
  6. GPT-4o generates a structured explanation
  7. Hash of report optionally stored on-chain
  8. Monitoring engine re-checks contract periodically

Risk Score is computed using a weighted model:

RiskScore=∑(Severityi​×Weighti​)

Output: 0–100 vulnerability index.

Challenges We Faced

  • Designing a scalable modular architecture
  • Separating risk scoring logic from AI explanation layer
  • Ensuring deterministic scoring before AI interpretation
  • Secure private key handling for audit logging
  • Building a cron-based monitoring engine without spamming RPC
  • Coordinating multi-AI pipelines (Gemini + GPT-4o)

One major design decision: We intentionally separated AI reasoning from scoring logic to prevent hallucinated risk values.

What We Learned

  • AI should assist deterministic systems — not replace them
  • On-chain logging adds real credibility
  • Autonomous agents require strict action validation
  • Web3 UX improves drastically with natural language interfaces

Most importantly:

Security intelligence must be explainable.

Why It Matters

ChainPilot AI introduces:

  • AI-native Web3 UX
  • On-chain verifiable security reports
  • Continuous contract surveillance
  • Agent-based transaction execution

It’s a programmable AI firewall for decentralized finance.

Built With

Languages

  • TypeScript
  • Solidity
  • JavaScript

Frameworks

  • Next.js 14
  • Express.js
  • Tailwind CSS
  • Hardhat

AI APIs

  • OpenAI GPT-4o
  • Google Gemini API

Blockchain

  • ethers.js v6
  • Sepolia Testnet

Database

  • MongoDB

Auth

  • Privy

Agent Framework

  • ElizaOS

Built With

Share this project:

Updates