Documentation

AI Contract Analyzer

Analyze smart contracts with GPT-4o to get instant risk scores and plain-English security reports

ChainRaven's AI Contract Analyzer uses GPT-4o to automatically review smart contract source code and deliver a comprehensive risk assessment in plain English. It's the fastest way to understand what a contract does, who controls it, and what risks it may carry — before you interact with it or add it to your watchlist.

How It Works

  1. Enter a verified contract address and select the blockchain network
  2. ChainRaven fetches the verified source code from the chain's block explorer
  3. GPT-4o analyzes the code and generates a structured report
  4. Results are saved to your analysis history for later reference

Required: The contract must have verified source code on its block explorer. Unverified or bytecode-only contracts cannot be analyzed.


Accessing the Analyzer

Navigate to Analyze in the top navigation bar, or click the AI Analysis banner from your dashboard. You can analyze any contract address — it does not need to be on your watchlist.


Understanding the Analysis Report

Each report contains five structured sections:

Contract Purpose

A plain-English summary of what the contract does — whether it's a token, a lending protocol, a DEX, an NFT collection, or something else. This helps you quickly understand the contract's role before diving into technical details.

Key Functions

A breakdown of the contract's most important functions: what they do, who can call them, and what state they modify. Pay close attention to any functions that can move funds or change critical protocol settings.

Access Control

Who controls the contract and how. This section identifies:

  • Owner / Admin roles — addresses with elevated privileges
  • Role-based access control — any AccessControl roles (e.g., MINTER_ROLE, PAUSER_ROLE)
  • Timelocks — whether privileged operations have mandatory delays
  • Multisig requirements — whether actions require multiple signers

Centralized access control is one of the most common risk vectors in DeFi. Contracts where a single address can pause, upgrade, or drain the protocol carry significant trust assumptions.

Risk Factors

A list of identified risk factors, each with a plain-English explanation:

Risk FactorWhat It Means
Upgradeable proxyContract logic can be silently replaced by the admin
Centralized ownershipA single address controls all critical functions
Mint authorityNew tokens can be created by privileged addresses
Pause mechanismThe contract can be frozen, blocking user withdrawals
Fee manipulationFee parameters can be changed arbitrarily
Missing reentrancy guardPotential vulnerability to reentrancy exploits
Unchecked external callsCalls to external contracts without error handling

Token Economics

For ERC-20 and similar token contracts: supply mechanics, inflation/deflation mechanisms, transfer fees, blacklists, and transfer limits.


Risk Score

Every analysis produces a Risk Score from 0 to 100:

ScoreLevelWhat It Means
0–30🟢 HealthyLow risk profile, standard patterns
31–70🟡 ElevatedNotable risk factors present — review carefully
71–100🔴 CriticalHigh-risk factors identified — proceed with caution

Important: The risk score is a heuristic based on identified patterns — it's a starting point for due diligence, not a security guarantee. A score of 0 does not mean the contract is safe. Always review the full report before making decisions.


Usage Limits

PlanDaily Analyses
Free10 per day
Pro50 per day
UltimateUnlimited

Limits reset at midnight UTC each day. Your remaining analyses are displayed on the analyzer page.


Analysis History

All analyses are saved to your account. You can review past analyses from the Analyze page — useful for:

  • Comparing reports before and after a proxy upgrade
  • Tracking whether a contract's risk profile has changed over time
  • Sharing analysis links with your team

Supported Chains

The AI analyzer supports all chains available for contract monitoring:

ChainBlock Explorer
EthereumEtherscan
BaseBasescan
PolygonPolygonscan
ArbitrumArbiscan
OptimismOptimistic Etherscan

Tips for Best Results

  • Analyze before monitoring — run an AI analysis on a contract before adding it to your watchlist to understand its risk profile upfront
  • Re-analyze after upgrades — if you receive a Proxy Upgrade alert, re-analyze the new implementation address to understand what changed
  • Compare risk scores over time — use the history to detect if a contract's risk profile worsened after an upgrade or governance change
  • Don't rely on score alone — read the full Access Control and Risk Factors sections, especially for contracts you interact with regularly