Please use this identifier to cite or link to this item: http://bura.brunel.ac.uk/handle/2438/32221
Title: Micro-Patterns in Solidity Code
Authors: Ruschioni, L
Shuttleworth, R
Neykova, R
Re, B
Destefanis, G
Keywords: cs.SE;cs.PL;solidity;smart contract;micro pattern;pattern recognition
Issue Date: 2-May-2025
Publisher: Cornell University
Citation: Ruschioni, L. et al. (2025) 'Micro-Patterns in Solidity Code', arXiv Preprint, arXiv:2505.01282v1 [cs.SE], pp. 1 - 11. doi: 10.48550/arXiv.2505.01282.
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 smart contracts from five popular blockchains (Ethereum, Polygon, Arbitrum, Fantom and Optimism). Our analysis reveals widespread adoption of micro-patterns, with 99% of contracts implementing at least one pattern and an average of 2.76 patterns per contract. The Storage Saver pattern showed the highest adoption (84.62% mean coverage), while security patterns demonstrated platform-specific adoption rates. Statistical analysis revealed significant platform-specific differences in pattern adoption, particularly in Borrower, Implementer, and Storage Optimization patterns.
Description: This is a preprint version of the conference paper presented to Proceedings at The 29th International Conference on Evaluation and Assessment in Software Engineering (EASE 2025), 17-20 June, Istanbul, Turkey. It is available online at https://arxiv.org/abs/2505.01282.
URI: https://bura.brunel.ac.uk/handle/2438/32221
DOI: https://doi.org/10.48550/arXiv.2505.01282
Other Identifiers: ORCiD: Rumyana Neykova https://orcid.org/0000-0002-2755-7728
ORCiD: Giuseppe Destefanis https://orcid.org/0000-0003-3982-6355
arXiv:2505.01282v1 [cs.SE]
Appears in Collections:Dept of Computer Science Research Papers

Files in This Item:
File Description SizeFormat 
FullText.pdf© 2025 Copyright held by the owner/author(s). arXiv.org - Non-exclusive license to distribute: The URI https://arxiv.org/licenses/nonexclusive-distrib/1.0/ is used to record the fact that the submitter granted the following license to arXiv.org on submission of an article: I grant arXiv.org a perpetual, non-exclusive license to distribute this article. I certify that I have the right to grant this license. I understand that submissions cannot be completely removed once accepted. I understand that arXiv.org reserves the right to reclassify or reject any submission. Publication rights licensed to ACM.1.43 MBAdobe PDFView/Open


Items in BURA are protected by copyright, with all rights reserved, unless otherwise indicated.