SymExplainer: An Integrated Framework for Interpretable ERC Violation Detection in Smart Contracts
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
The immutable nature of smart contracts necessitates rigorous auditing, especially for ERC compliance, to prevent significant economic losses. While automated tools, particularly those combining Large Language Models (LLMs) with symbolic execution, have improved detection, they often suffer from false positives, false negatives, and insufficient interpretability. This paper introduces SymExplainer, a novel integrated framework designed to overcome these limitations. SymExplainer features an LLM-Enhanced Rule Semantic Extraction Module that deeply understands ERC specifications and misuse patterns using multi-stage prompting and a domain-specific knowledge base. Its Context-Aware Symbolic Execution Engine then efficiently prioritizes exploration paths based on these LLM insights. Crucially, a Violation Verification and Interpretability Generation Module performs secondary LLM-based cross-validation to significantly reduce false positives and produces comprehensive, natural language reports detailing "why," "where," and "how-to-fix" confirmed violations. Evaluated on a ground-truth dataset of 159 expert-annotated ERC violations, SymExplainer achieved perfect recall with zero false negatives and substantially reduced false positives to only 15, outperforming state-of-the-art methods like SymGPT (which reported 29 false positives and 1 false negative). An ablation study confirmed the critical contribution of each module, and qualitative human evaluation validated the high clarity, accuracy, and actionability of its interpretability reports. Despite a modest increase in computational cost, SymExplainer provides a more precise, reliable, and transparent solution for smart contract auditing through unparalleled accuracy, reduced noise, and actionable insights.