Smart contracts are self-executing programs that run on blockchains (e.g., Ethereum). 680 million US dollars worth of digital assets controlled by smart contracts have been hacked or stolen due to various security vulnerabilities in 2021. Although security is a fundamental concern for smart contracts, it is unclear how smart contract developers approach security. To help fill this research gap, we conducted an exploratory qualitative study consisting of a semi-structured interview and a code review task with 29 smart contract developers with diverse backgrounds, including 10 early stage (less than one year of experience) and 19 experienced (2-5 years of experience) smart contract developers. Our findings show a wide range of smart contract security perceptions and practices including various tools and resources they used. Our early-stage developer participants had a much lower success rate (15%) of identifying security vulnerabilities in the code review task than their experienced counterparts (55%). Our hierarchical task analysis of their code reviews implies that just by accessing standard documentation, reference implementations and security tools is not sufficient. Many developers checked those materials or used a security tool but still failed to identify the security issues. In addition, several participants pointed out shortcomings of current smart contract security tooling such as its usability. We discuss how future education and tools could better support developers in ensuring smart contract security.
翻译:智能合同是自动执行的程序,在链条上运行(例如Ethereum)。 价值6.8亿美元的智能合同控制的数字资产由于2021年各种安全弱点而被黑客或被盗。虽然安全是智能合同的一个基本关切,但尚不清楚智能合同开发者如何对待安全。为了帮助填补这一研究差距,我们进行了一项探索性定性研究,其中包括半结构访谈和代码审查任务,有29个具有不同背景的智能合同开发者,包括10个早期阶段(不到一年的经验)和19个经验丰富的(2-5年的经验)智能合同开发者。我们的调查结果显示,各种智能合同安全观和做法,包括他们所使用的各种工具和资源。我们的早期开发者在查明代码审查任务中的安全弱点的成功率(15%)比经验丰富的对应者(55%)要低得多。我们对其代码审查的等级任务分析意味着,仅仅通过获取标准文件、参考实施和安全工具是不够的。许多开发者检查了这些材料或使用了安全工具,但仍未能查明安全问题。此外,一些参与者指出,目前的智能合同安全工具的缺陷在于如何确保未来的安全工具。