ErrorExplainer: Automated Extraction of Error Contexts from Smart Contracts

Citations

WEB OF SCIENCE

0
Citations

SCOPUS

0

초록

A persistent semantic gap separates the low-level revert data emitted by smart contracts from the high-level explanations Web3 users need when a transaction fails. Existing automated analyzers treat such reverts as hints of hidden vulnerabilities and do not tell users what actually went wrong. To close this gap and give users useful feedback, I present ErrorExplainer, an automated error-explanation framework rather than another bug detector. ErrorExplainer takes a novel two-phase approach. A lightweight static analysis of verified source code lifts every transaction-reverting statement into a canonical error representation of an origin function, a guard condition, and an expected error message. At runtime, when a failure occurs, ErrorExplainer first checks the invariant part of the error data with the error representation of the called function. If no hit appears, it expands the candidates to call traces until a match is found and then shows the matched record as a clear, human-readable explanation. The evaluation results show that ErrorExplainer could effectively identify 6284 normalized error records from a reverting-related dataset of SC-Bench. The high information completeness (0.952) and matching fitness (0.954 and 0.604 at the function and trace levels, respectively) indicate that the extracted error context of ErrorExplainer can provide more understandable information to users on failed operations.

키워드

smart contracterror contexttransaction-reverting statementsstatic analysis
제목
ErrorExplainer: Automated Extraction of Error Contexts from Smart Contracts
저자
Lee, JongHyup
DOI
10.3390/app15116006
발행일
2025-05
유형
Article
저널명
APPLIED SCIENCES-BASEL
15
11