️ ExploitReplay
Deterministic smart contract security workspace combining static analysis, exploit corpus matching, and sandboxed EVM replay

️ ExploitReplay
Deterministic smart contract security workspace combining static analysis, exploit corpus matching, and sandboxed EVM replay

How It Connects
ExploitReplay unifies multi-stage static analysis with live EVM simulation into a single developer-facing security workspace. When a Solidity contract is provided, the backend initiates Slither AST parsing and custom static detectors to extract the control flow graph (CFG), data-dependency trees, and vulnerable opcode sequences. Simultaneously, the historical exploit intelligence engine executes BM25 lexical matching and semantic vector retrieval over a curated corpus of 100+ documented DeFi exploits (including The DAO, Euler, Curve, and Cream Finance) to detect structural exploit analogies. Identified vulnerabilities are then synthesized into reproducible Foundry Anvil fork replay scripts, enabling developers to simulate the exploit deterministically, verify remediation patches in isolated local execution, and generate audit-ready security reports.
Components
System Components
How It Works
Contract Ingestion & AST Analysis
Uploads or pastes Solidity contract source code into the workspace.
Historical Incident Matching
Queries indexed historical exploit database using extracted AST signatures.
Deterministic EVM Replay Simulation
Spawns an ephemeral EVM test harness and replays the attack transaction path.
Patch Verification & Remediation
Applies candidate security patches and re-runs the exploit simulation.
Contract Ingestion & AST Analysis
Uploads or pastes Solidity contract source code into the workspace.
Historical Incident Matching
Queries indexed historical exploit database using extracted AST signatures.
Deterministic EVM Replay Simulation
Spawns an ephemeral EVM test harness and replays the attack transaction path.
Patch Verification & Remediation
Applies candidate security patches and re-runs the exploit simulation.
Technical Breakdown
Granular architectural layers, runtime dependencies, and audited production decisions.
- Next.js 14 App Routercopy
- React 18copy
- TypeScriptcopy
- Tailwind CSScopy
- Monaco Code Editorcopy
- Lucide Reactcopy
- FastAPIcopy
- Python 3.11copy
- Slither Static Analyzercopy
- Web3.pycopy
- Foundry Anvil/Castcopy
Engineering Tradeoffs & Key Decisions
Why this architecture over alternativesDual Static Analysis and Dynamic EVM Replay
Combined Slither AST analysis with isolated Foundry Anvil fork simulation rather than relying on static detectors alone.
Static analyzers generate high false-positive rates; verifying candidate vulnerabilities inside an active EVM fork proves real-world exploitability with zero ambiguity.
Hybrid AST Pattern Matching over Naive Vector Search
Implemented structural token extraction and BM25 scoring alongside dense vector embeddings for historical exploit retrieval.
Pure text embeddings frequently miss subtle Solidity semantic differences; structural token matching captures the exact architectural flaw regardless of variable naming.