paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Characterizing Transaction-Reverting Statements in Ethereum Smart Contracts

刻画以太坊智能合约中的交易回滚语句
ASE 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE)2021匹配度 2/10 · 该论文是以太坊智能合约中交易回滚语句的实证与安全影响研究,属于区块链/智能合约安全与程序分析,但未涉及用户核心关注的 LLM/Agent 与静态分析交叉、浮点程序分析或贝叶斯程序分析。虽然包含程序分析标签,但与研究方向关联较弱。引用 28 inbox
Lu Liu, Lili Wei, Wuqi Zhang, Ming Wen, Yepang Liu, Shing-Chi Cheung
crossref: 2026-09-12

AI 速览

一句话:首次实证刻画以太坊智能合约中 require、if…revert、if…throw 等交易回滚语句的使用模式与安全影响。

智能合约在运行时违反输入约束或安全属性时,需要通过交易回滚语句避免异常后果。以太坊开发者可使用 require、if…revert 和 if…throw 三类回滚语句,但其实际使用方式缺乏系统理解。本文首次对以太坊智能合约中的交易回滚语句进行实证研究:测量了 3,866 个来自热门 DApp 的已验证合约中这些语句的普遍性;人工分析 557 条回滚语句并构建用途分类体系;比较模板合约与对应自定义合约,理解开发者如何定制回滚语句;通过删除回滚语句生成变异合约并与原合约对比,分析其安全影响。研究发现,回滚语句常用于七类权限验证或有效性检查,缺失可能损害合约安全;现有智能合约安全分析器在检测漏洞时无法有效处理这些语句。

问题
现有工作对以太坊智能合约中三类交易回滚语句的实际使用方式、开发者定制模式及其安全影响缺乏系统理解。
方法
对热门 DApp 的已验证智能合约进行实证测量,人工分析回滚语句并构建用途分类体系,比较模板合约与自定义合约,并通过删除回滚语句的变异合约分析安全影响。
评估
在 3,866 个已验证智能合约上测量回滚语句普遍性,人工分析 557 条语句;删除回滚语句后与原合约对比,并考察现有安全分析器对这些语句的处理能力,发现其难以有效检测相关漏洞。
原文摘要(Abstract)

Smart contracts are programs stored on blockchains to execute transactions. When input constraints or security properties are violated at runtime, the transaction being executed by a smart contract needs to be reverted to avoid undesirable consequences. On Ethereum, the most popular blockchain that supports smart contracts, developers can choose among three transaction-reverting statements (i.e., require, if…revert, and if…throw) to handle anomalous transactions. While these transaction-reverting statements are vital for preventing smart contracts from exhibiting abnormal behaviors or suffering malicious attacks, there is limited understanding of how they are used in practice. In this work, we perform the first empirical study to characterize transaction-reverting statements in Ethereum smart contracts. We measured the prevalence of these statements in 3,866 verified smart contracts from popular dapps and built a taxonomy of their purposes via manually analyzing 557 transaction-reverting statements. We also compared template contracts and their corresponding custom contracts to understand how developers customize the use of transaction-reverting statements. Finally, we analyzed the security impact of transaction-reverting statements by removing them from smart contracts and comparing the mutated contracts against the original ones. Our study led to important findings. For example, we found that transaction-reverting statements are commonly used to perform seven types of authority verifications or validity checks, and missing such statements may compromise the security of smart contracts. We also found that current smart contract security analyzers cannot effectively handle transaction-reverting statements when detecting security vulnerabilities. Our findings can shed light on further research in the broad area of smart contract quality assurance and provide practical guidance to smart contract developers on the appropriate use of transaction-reverting statements.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6632,
  title = {Characterizing Transaction-Reverting Statements in Ethereum Smart Contracts},
  author = {Lu Liu and Lili Wei and Wuqi Zhang and Ming Wen and Yepang Liu and Shing-Chi Cheung},
  booktitle = {ASE},
  year = {2021},
  doi = {10.1109/ase51524.2021.9678597}
}