An Empirical Study of Solidity Language Features

Ziyan Wang,Xiangping Chen,Xiaocong Zhou,Yuan Huang,Zibin Zheng,Jiajing Wu
DOI: https://doi.org/10.1109/qrs-c55045.2021.00105
2021-01-01
Abstract:Solidity, like other programming languages, is evolving with many new features being introduced and deprecated features being removed. However, not every feature benefits developers and sometimes it may do more harm than good. In the hope of knowing the actual use of language features and helping improving them, we summarize 41 common features, discuss their pros and cons, and conduct an empirical study. We design an extensible feature analysis tool to analyze their distribution in 172,645 real-world smart contracts. We further analyze the reason why some features are popular. We invite readers for a case study to understand the usage patterns and how seemingly benign features produce subtle bugs. It turns out that some features like high-level function invocations, visibility, events, and assertions are popular while developers cares little about some other features like function modifier overloading. After summarizing our findings, we give suggestions to different people in Solidity community.
What problem does this paper attempt to address?