Smart contracts are programs running on blockchain 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, which 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.


翻译:智能合同是执行交易的链条程序。 当输入限制或安全财产在运行时被违反时,需要恢复智能合同执行的交易,以避免不可取的后果。在最受欢迎的支持智能合同的链条Ethereum上,开发商可以选择三种交易反转报表(即,要求,如果.反转,如果.推)处理异常交易。这些交易反转报表对于防止智能合同显示异常行为或遭受恶意攻击至关重要,但对于如何在实践中使用这些报表的理解有限。在这项工作中,我们进行了第一次实验性研究,以确定Eteenum智能合同中交易反转报表的特点。我们通过手动分析557个交易反转报表(即,要求,如果.反转,如果.),开发商可以对这些报表进行分类。我们还比较模板合同及其相应的定制合同,以了解开发商如何定制交易反转报表的使用。最后,我们分析了交易反转报表在实际合同中的安全影响,从智能合同中删除这些报表,并将智能合同与智能合同比较到智能合同领域。我们将智能合同中的智能合同的使用与智能合同进行更精确的比较。

0
下载
关闭预览

相关内容

专知会员服务
66+阅读 · 2020年10月17日
专知会员服务
123+阅读 · 2020年9月8日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
还在修改博士论文?这份《博士论文写作技巧》为你指南
机器学习入门的经验与建议
专知会员服务
91+阅读 · 2019年10月10日
TensorFlow 2.0 学习资源汇总
专知会员服务
66+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
已删除
将门创投
4+阅读 · 2018年11月15日
计算机类 | 期刊专刊截稿信息9条
Call4Papers
4+阅读 · 2018年1月26日
Arxiv
0+阅读 · 2021年10月22日
Arxiv
0+阅读 · 2021年10月21日
Arxiv
0+阅读 · 2021年10月18日
VIP会员
相关VIP内容
专知会员服务
66+阅读 · 2020年10月17日
专知会员服务
123+阅读 · 2020年9月8日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
76+阅读 · 2020年7月26日
还在修改博士论文?这份《博士论文写作技巧》为你指南
机器学习入门的经验与建议
专知会员服务
91+阅读 · 2019年10月10日
TensorFlow 2.0 学习资源汇总
专知会员服务
66+阅读 · 2019年10月9日
【SIGGRAPH2019】TensorFlow 2.0深度学习计算机图形学应用
专知会员服务
39+阅读 · 2019年10月9日
相关资讯
CCF A类 | 顶级会议RTSS 2019诚邀稿件
Call4Papers
10+阅读 · 2019年4月17日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
已删除
将门创投
4+阅读 · 2018年11月15日
计算机类 | 期刊专刊截稿信息9条
Call4Papers
4+阅读 · 2018年1月26日
Top
微信扫码咨询专知VIP会员