LLM audit of smart contracts
Traditional audit costs $50-200k and takes weeks. LLM audit in minutes finds typical vulnerability patterns. Not a replacement, but a first filter before expensive audit.
pip install slither-analyzer openai
# Комбинация статического анализа + LLM
from slither.slither import Slither
from openai import OpenAI
slither = Slither("contract.sol")
# Получаем граф вызовов и переменные состояния
contract_info = extract_contract_info(slither)
client = OpenAI()
response = client.chat.completions.create(
model="gpt-4o",
messages=[{
"role": "user",
"content": f"Найди уязвимости в этом Solidity контракте:
{contract_info}"
}]
)
On-chain analytics via natural language
The Dune Analytics project added an AI assistant in 2025 — now "how many unique wallets interacted with Uniswap v4 in the last 7 days" is automatically converted to SQL. On GitHub: text2sql adapted for Ethereum data.
Autonomous DeFi agents
The agent monitors positions on Aave, receives alerts if health factor drops below the threshold, automatically performs rebalancing. The code is open source, the wallet under agent control — real practice among 2026 DeFi power users.
Top open-source projects
| Project | GitHub | Stars | Function |
|---|---|---|---|
| crytic/slither | crytic/slither | 5.2k | Static analysis of Solidity |
| OpenZeppelin/defender-sdk | OpenZeppelin/defender-sdk | 1.8k | Automation of smart contracts |
| ethereumjs/ethereumjs-monorepo | ethereumjs | 2.1k | Ethereum in JS/TS |
Where the risks are
An agent with wallet access is a risk. LLM hallucination when working with finances is unacceptable. Practice: the agent only reads and alerts, the human confirms transactions. Full autonomy only with limits and a kill switch.
FAQ
Can LLM fully replace smart contract auditors?
No. LLM does well finding typical patterns (reentrancy, integer overflow) but misses business-logic vulnerabilities specific to a particular protocol. It's a helper tool, not a replacement.
Which networks best support AI agents?
EVM-compatible (Ethereum, Arbitrum, Base) — the richest ecosystem of tools. Solana — growing fast, especially in the DeFi agents part.