Micro-Patterns in Solidity Code
Luca Ruschioni, Robert Shuttleworth, Rumyana Neykova, Barbara Re,, Giuseppe Destefanis

TL;DR
This paper identifies and analyzes 18 micro-patterns in Solidity smart contracts, revealing their widespread adoption and platform-specific variations, to improve understanding and analysis of blockchain code.
Contribution
It introduces a set of Solidity-specific micro-patterns and demonstrates their prevalence and significance across multiple blockchain platforms.
Findings
99% of contracts implement at least one micro-pattern
Average of 2.76 patterns per contract
Storage Saver pattern has 84.62% adoption
Abstract
Solidity is the predominant programming language for blockchain-based smart contracts, and its characteristics pose significant challenges for code analysis and maintenance. Traditional software analysis approaches, while effective for conventional programming languages, often fail to address Solidity-specific features such as gas optimization and security constraints. This paper introduces micro-patterns - recurring, small-scale design structures that capture key behavioral and structural peculiarities specific to a language - for Solidity language and demonstrates their value in understanding smart contract development practices. We identified 18 distinct micro-patterns organized in five categories (Security, Functional, Optimization, Interaction, and Feedback), detailing their characteristics to enable automated detection. To validate this proposal, we analyzed a dataset of 23258…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvanced ceramic materials synthesis · Aluminum Alloy Microstructure Properties · Metal Forming Simulation Techniques
