Charting The Evolution of Solidity Error Handling

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Mitropoulos, Charalambos, Kechagia, Maria, Maschas, Chrysostomos, Ioannidis, Sotiris, Sarro, Federica, Mitropoulos, Dimitris
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866911771083669504
author Mitropoulos, Charalambos
Kechagia, Maria
Maschas, Chrysostomos
Ioannidis, Sotiris
Sarro, Federica
Mitropoulos, Dimitris
author_facet Mitropoulos, Charalambos
Kechagia, Maria
Maschas, Chrysostomos
Ioannidis, Sotiris
Sarro, Federica
Mitropoulos, Dimitris
contents The usage of error handling in Solidity smart contracts is vital because smart contracts perform transactions that should be verified. Transactions that are not carefully handled, may lead to program crashes and vulnerabilities, implying financial loss and legal consequences. While Solidity designers attempt to constantly update the language with new features, including error-handling (EH) features, it is necessary for developers to promptly absorb how to use them. We conduct a large-scale empirical study on 283K unique open-source smart contracts to identify patterns regarding the usage of Solidity EH features over time. Overall, the usage of most EH features is limited. However, we observe an upward trend (> 60%) in the usage of a Solidity-tailored EH feature, i.e., require. This indicates that designers of modern programming languages may consider making error handling more tailored to the purposes of each language. Our analysis on 102 versions of the Solidity documentation indicates the volatile nature of Solidity, as the language changes frequently, i.e., there are changes on EH features once or twice a year. Such frequent releases may confuse smart contract developers, discouraging them to carefully read the Solidity documentation, and correctly adopt EH features. Furthermore, our findings reveal that nearly 70% of the examined smart contracts are exposed to potential failures due to missing error handing, e.g., unchecked external calls. Therefore, the use of EH features should be further supported via a more informative documentation containing (1) representative and meaningful examples and (2) details about the impact of potential EH misuses.
format Preprint
id arxiv_https___arxiv_org_abs_2402_03186
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Charting The Evolution of Solidity Error Handling
Mitropoulos, Charalambos
Kechagia, Maria
Maschas, Chrysostomos
Ioannidis, Sotiris
Sarro, Federica
Mitropoulos, Dimitris
Software Engineering
The usage of error handling in Solidity smart contracts is vital because smart contracts perform transactions that should be verified. Transactions that are not carefully handled, may lead to program crashes and vulnerabilities, implying financial loss and legal consequences. While Solidity designers attempt to constantly update the language with new features, including error-handling (EH) features, it is necessary for developers to promptly absorb how to use them. We conduct a large-scale empirical study on 283K unique open-source smart contracts to identify patterns regarding the usage of Solidity EH features over time. Overall, the usage of most EH features is limited. However, we observe an upward trend (> 60%) in the usage of a Solidity-tailored EH feature, i.e., require. This indicates that designers of modern programming languages may consider making error handling more tailored to the purposes of each language. Our analysis on 102 versions of the Solidity documentation indicates the volatile nature of Solidity, as the language changes frequently, i.e., there are changes on EH features once or twice a year. Such frequent releases may confuse smart contract developers, discouraging them to carefully read the Solidity documentation, and correctly adopt EH features. Furthermore, our findings reveal that nearly 70% of the examined smart contracts are exposed to potential failures due to missing error handing, e.g., unchecked external calls. Therefore, the use of EH features should be further supported via a more informative documentation containing (1) representative and meaningful examples and (2) details about the impact of potential EH misuses.
title Charting The Evolution of Solidity Error Handling
topic Software Engineering
url https://arxiv.org/abs/2402.03186