Are the smart contracts on Q&A site reliable?

业务 计算机科学
作者
Xiaocong Zhou,Quanqi Wang,Yifan Liu,Xiangping Chen,Yuan Huang,Zibin Zheng
出处
期刊:Software - Practice and Experience [Wiley]
标识
DOI:10.1002/spe.3361
摘要

Abstract Ethereum, as a leading blockchain platform, has attracted a significant number of practitioners. These practitioners require a platform for communication and collaborative problem‐solving, which led to Ethereum Stack Exchange (ESE), a Q&A site dedicated to Ethereum‐related issues. While the Q&A site facilitates communication among practitioners, it also introduces new challenges. Practitioners adopt code snippets from Q&A sites to address problems encountered. However, the quality of code snippets on ESE remains largely unexplored. Vulnerabilities and gas‐inefficient patterns in ESE may spread to the code in Ethereum and threaten its regular operation. In this article, we conduct an empirical study investigating the distribution of vulnerabilities and gas‐inefficient patterns in ESE. Further, we analyze the potential impact of vulnerabilities and gas‐inefficient patterns from ESE on Ethereum. However, we encounter a problem during the vulnerability and gas‐inefficient pattern detection. Established smart contract analysis tools in the mainstream realm necessitate complete source code files for thorough analysis, while codes on ESE are often incomplete code snippets. To address this, we introduce the AST‐based code clone detection technique to construct detectable files corresponding to code snippets. This enables us to detect vulnerabilities and gas‐inefficient patterns in code snippets. In the end, our findings demonstrate that 11.18% of the contract‐level code snippets and 4.06% of function‐level code snippets in ESE have vulnerabilities. And 27.21% of contract‐level code snippets and 17.89% of function‐level code snippets contain gas‐inefficient patterns. The additional consumption caused by the gas‐inefficient pattern in ESE is approximately $1,695,002. Based on these findings, we provide recommendations for both ESE and its users, aiming to foster collaborative efforts and create a more reliable Q&A site for practitioners.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
Sunnig盈完成签到,获得积分10
1秒前
一期一完成签到,获得积分10
1秒前
1秒前
孟雯毓发布了新的文献求助10
1秒前
karaha发布了新的文献求助10
2秒前
共享精神应助fung采纳,获得10
3秒前
3秒前
清平道人完成签到,获得积分10
3秒前
3秒前
鱼山发布了新的文献求助10
3秒前
Crazy完成签到,获得积分10
4秒前
utopia完成签到 ,获得积分10
4秒前
冷酷的海露完成签到,获得积分10
5秒前
5秒前
JZ133发布了新的文献求助10
5秒前
啦啦啦完成签到,获得积分10
5秒前
luke发布了新的文献求助10
5秒前
6秒前
思源应助科研通管家采纳,获得10
6秒前
严锦强完成签到,获得积分10
6秒前
6秒前
桐桐应助科研通管家采纳,获得10
6秒前
爆米花应助科研通管家采纳,获得10
6秒前
Owen应助科研通管家采纳,获得10
6秒前
6秒前
风清扬应助科研通管家采纳,获得30
6秒前
zz完成签到,获得积分10
6秒前
情怀应助科研通管家采纳,获得10
6秒前
gzh完成签到,获得积分10
6秒前
gzhoax应助科研通管家采纳,获得10
6秒前
苑开心完成签到,获得积分10
6秒前
7秒前
彭于晏应助wu采纳,获得10
7秒前
7秒前
LEO2025完成签到,获得积分10
7秒前
ohnono完成签到,获得积分10
8秒前
tao完成签到,获得积分10
8秒前
当归完成签到,获得积分10
8秒前
芒果发布了新的文献求助10
9秒前
Emma完成签到 ,获得积分10
9秒前
高分求助中
Malcolm Fraser : a biography 680
Signals, Systems, and Signal Processing 610
天津市智库成果选编 600
Climate change and sports: Statistics report on climate change and sports 500
Forced degradation and stability indicating LC method for Letrozole: A stress testing guide 500
Organic Reactions Volume 118 400
A Foreign Missionary on the Long March: The Unpublished Memoirs of Arnolis Hayman of the China Inland Mission 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6459556
求助须知:如何正确求助?哪些是违规求助? 8268596
关于积分的说明 17623135
捐赠科研通 5528913
什么是DOI,文献DOI怎么找? 2905962
邀请新用户注册赠送积分活动 1882694
关于科研通互助平台的介绍 1727902