An Empirical Study of Solidity Language Features

Ziyan Wang, Xiangping Chen, Xiaocong Zhou, Yuan Huang, Zibin Zheng, Jiajing Wu · 2021 IEEE 21st International Conference on Software Quality, Reliability and Security Companion (QRS-C) · 2021

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.

Read the paper · More papers on PaperTik