一句话:提出 RcAudit,用运行时上下文增强 LLM 推理来检测智能合约中的业务逻辑漏洞。
智能合约是 DeFi 的基础,但其业务逻辑漏洞——代码语法正确却违背合约预期行为——依然难以检测。现有基于 LLM 的方法大多沿用静态、以源码为中心的审计范式,而智能合约本质上是状态化的:许多逻辑缺陷只在特定合约状态及特定状态迁移下才暴露,因此纯代码审计既会误报也会漏报。为此作者提出 RcAudit,通过运行时上下文增强的 LLM 推理来检测逻辑漏洞。系统首先构建合约逻辑知识库,从多视角刻画合约行为以支撑 LLM 分析;随后采用状态与意图感知的模糊测试策略生成逻辑关键的运行时上下文,并对那些表现出潜在“意图—行为”不一致的上下文进行 LLM 推理,从而精确定位漏洞。在三个真实数据集上,RcAudit 从 132 个已知逻辑漏洞中检出 74 个,精确率达 96.9%,检测能力比最强基线高 117.6%,并在真实项目中额外发现 22 个零日漏洞。
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.
@inproceedings{paperbot12247,
title = {Evidence-Grounded Logic Vulnerability Detection for Smart Contracts via Runtime Context Reasoning},
author = {Guang Gong and Yucong Jiang and Rong Jian and Xiaotao Feng and Zhihan Wei and Qi Li and Ke Xu},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837471}
}