Evidence-Grounded Logic Vulnerability Detection for Smart Contracts via Runtime Context Reasoning
Open Access
- 7 October 2026
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 2216-2228
Abstract
Smart contracts are foundational to DeFi, yet detecting business-logic vulnerabilities, i.e., execution is syntactically correct but violates a contract’s intended behavior, remains difficult. Most recent LLM-based approaches still follow a largely static, source-code–centric auditing paradigm. In practice, however, smart contracts are inherently stateful: many logic flaws emerge only under specific contract states and across particular state transitions. As a result, code-only auditing can produce false positives and miss true vulnerabilities. To address this gap, we present RcAudit, a system for detecting smart-contract logic vulnerabilities via runtime-context–enhanced LLM reasoning. RcAudit constructs a Contract Logic Knowledge Base that captures contract behavior from multiple perspectives to support LLM analysis. It then applies a state- and intent-aware fuzzing strategy to generate logic-critical runtime contexts, and performs LLM reasoning over selected contexts that exhibit potential intent–behavior inconsistencies to pinpoint vulnerabilities. We evaluate RcAudit on three real-world datasets. RcAudit identifies 74 of 132 known logic vulnerabilities with high precision (96.9%), achieving 117.6% higher detection than the strongest baseline. Importantly, RcAudit further uncovers 22 zero-day vulnerabilities in real-world projects.Keywords
Funding Information
- National Natural Science Foundation of China (62425201)
This publication has 29 references indexed in Scilit:
- PromFuzz: Leveraging LLM-Driven and Bug-Oriented Composite Analysis for Detecting Functional Bugs in Smart Contracts2025
- Automated Invariant Generation for Solidity Smart ContractsIEEE Transactions on Dependable and Secure Computing, 2025
- Adversarial generation method for smart contract fuzz testing seeds guided by chain-based LLMAutomated Software Engineering, 2024
- SmartInv: Multimodal Learning for Smart Contract Invariant Inference2024
- MuFuzz: Sequence-Aware Mutation and Seed Mask Guidance for Blockchain Smart Contract Fuzzing2024
- Demystifying Exploitable Bugs in Smart Contracts2023
- SMARTIAN: Enhancing Smart Contract Fuzzing with Static and Dynamic Data-Flow Analyses2021
- An overview on smart contracts: Challenges, advances and platformsFuture Generation Computer Systems, 2020
- Formal Verification of Workflow Policies for Smart Contracts in Azure Blockchain2020
- solc-verify: A Modular Verifier for Solidity Smart Contracts2020