arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2406.05712cs.SE
收藏

揭示智能合约升级的特征

Demystifying the Characteristics for Smart Contract Upgrades

Ye Liu, Shuo Li, Xiuheng Wu, Yi Li, Zhiyang Chen, David Lo

AI总结:

本文通过对以太坊上57,118个开源代理合约的实证研究,揭示了智能合约升级的主要意图及其引发的兼容性、存储冲突和初始化安全风险。

摘要:

可升级智能合约在去中心化应用生态系统中扮演着重要角色,用于支持日常维护、安全补丁和功能新增。在本文中,我们对基于代理的可升级智能合约进行了实证研究,以理解合约升级的特征。通过对57,118个开源代理合约的研究,我们发现有583个合约曾在以太坊上进行过升级,涉及973个独特的实现合约版本。结果表明,开发者在升级时往往旨在提升合约的可用性,其中功能新增和更新是最常见的升级意图。我们调查了合约升级的实际影响,例如导致兼容性问题的破坏性变更、存储冲突以及引发安全漏洞的初始化风险。结果表明,由于276个代理的升级,产生了4,334个ABI破坏性变更,在区块链见证的584笔交易中造成了现实世界中的使用中断;36次合约升级发生了存储冲突,5个代理及其59个实现合约容易受到初始化攻击。

英文摘要:

Upgradable smart contracts play an important role in the decentralized application ecosystem, to support routine maintenance, security patching, and feature additions. In this paper, we conduct an empirical study on proxy-based upgradable smart contracts to understand the characteristics of contract upgrading. Through our study on 57,118 open source proxy contracts, we found that 583 contracts have ever been upgraded on Ethereum, involving 973 unique implementation contract versions. The results show that developers often intend to improve usability of contracts if upgrading, where functionality addition and update are the most frequent upgrade intentions. We investigated the practical impacts of contract upgrades, e.g., breaking changes causing compatibility issues, storage collisions and initialization risks leading to security vulnerabilities. The results demonstrate that there are 4,334 ABI breaking changes due to the upgrades of 276 proxies, causing real-world broken usages within 584 transactions witnessed by the blockchain; 36 contract upgrades had storage collisions and five proxies with 59 implementation contracts are vulnerable to initialization attacks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑