File Download
There are no files associated with this item.
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.1109/TSE.2024.3491578
- Scopus: eid_2-s2.0-105003245320
- Find via

Supplementary
-
Citations:
- Scopus: 0
- Appears in Collections:
Article: Unearthing Gas-Wasting Code Smells in Smart Contracts With Large Language Models
| Title | Unearthing Gas-Wasting Code Smells in Smart Contracts With Large Language Models |
|---|---|
| Authors | |
| Keywords | Artificial Intelligence language models patterns program analysis smart contracts |
| Issue Date | 1-Jan-2025 |
| Publisher | Institute of Electrical and Electronics Engineers |
| Citation | IEEE Transactions on Software Engineering, 2025, v. 51, n. 4, p. 879-903 How to Cite? |
| Abstract | Smart contracts are automated programs stored on a blockchain, featuring unique attributes such as permissionlessness, trustlessness, immutability, and transparency. These properties underpin an array of unprecedented decentralized services. Compiled into bytecodes, Ethereum smart contracts are executed within the Ethereum Virtual Machine (EVM). Ethereum's distinct gas mechanism assigns a price to each bytecode execution, incentivizing resource-efficient computing. However, a disconnect exists between conventional coding practices and the less intuitive gas consumption computation mechanism, resulting in inadvertent gas wastage. Gas-wasting code smells at the source code level have been studied in various related works; however, the task of manually identifying such code smells by reading through codes and reasoning about them is both time-consuming and economically inefficient. In this work, we propose to leverage Large Language Models (LLMs), which have seen a surge in popularity recently, to facilitate undertaking the labor-intensive part of the code-smell-finding pipeline. In particular, we focus on Solidity, the predominant programming language for Ethereum smart contracts. Overall, we identified 26 gas-wasting code smells, out of which 13 were not presented in previous papers. On average, applying these code smells led to a reduction of approximately 10.534% in deployment costs and 21.528% in message call costs across our test codes. We further make a report on each of the identified code smells with associated example contracts sourced from either previous literature or recently deployed contracts. |
| Persistent Identifier | http://hdl.handle.net/10722/361908 |
| ISSN | 2023 Impact Factor: 6.5 2023 SCImago Journal Rankings: 1.868 |
| DC Field | Value | Language |
|---|---|---|
| dc.contributor.author | Jiang, Jinan | - |
| dc.contributor.author | Li, Zihao | - |
| dc.contributor.author | Qin, Haoran | - |
| dc.contributor.author | Jiang, Muhui | - |
| dc.contributor.author | Luo, Xiapu | - |
| dc.contributor.author | Wu, Xiaoming | - |
| dc.contributor.author | Wang, Haoyu | - |
| dc.contributor.author | Tang, Yutian | - |
| dc.contributor.author | Qian, Chenxiong | - |
| dc.contributor.author | Chen, Ting | - |
| dc.date.accessioned | 2025-09-17T00:31:55Z | - |
| dc.date.available | 2025-09-17T00:31:55Z | - |
| dc.date.issued | 2025-01-01 | - |
| dc.identifier.citation | IEEE Transactions on Software Engineering, 2025, v. 51, n. 4, p. 879-903 | - |
| dc.identifier.issn | 0098-5589 | - |
| dc.identifier.uri | http://hdl.handle.net/10722/361908 | - |
| dc.description.abstract | <p>Smart contracts are automated programs stored on a blockchain, featuring unique attributes such as permissionlessness, trustlessness, immutability, and transparency. These properties underpin an array of unprecedented decentralized services. Compiled into bytecodes, Ethereum smart contracts are executed within the Ethereum Virtual Machine (EVM). Ethereum's distinct gas mechanism assigns a price to each bytecode execution, incentivizing resource-efficient computing. However, a disconnect exists between conventional coding practices and the less intuitive gas consumption computation mechanism, resulting in inadvertent gas wastage. Gas-wasting code smells at the source code level have been studied in various related works; however, the task of manually identifying such code smells by reading through codes and reasoning about them is both time-consuming and economically inefficient. In this work, we propose to leverage Large Language Models (LLMs), which have seen a surge in popularity recently, to facilitate undertaking the labor-intensive part of the code-smell-finding pipeline. In particular, we focus on Solidity, the predominant programming language for Ethereum smart contracts. Overall, we identified 26 gas-wasting code smells, out of which 13 were not presented in previous papers. On average, applying these code smells led to a reduction of approximately 10.534% in deployment costs and 21.528% in message call costs across our test codes. We further make a report on each of the identified code smells with associated example contracts sourced from either previous literature or recently deployed contracts.</p> | - |
| dc.language | eng | - |
| dc.publisher | Institute of Electrical and Electronics Engineers | - |
| dc.relation.ispartof | IEEE Transactions on Software Engineering | - |
| dc.subject | Artificial Intelligence | - |
| dc.subject | language models | - |
| dc.subject | patterns | - |
| dc.subject | program analysis | - |
| dc.subject | smart contracts | - |
| dc.title | Unearthing Gas-Wasting Code Smells in Smart Contracts With Large Language Models | - |
| dc.type | Article | - |
| dc.identifier.doi | 10.1109/TSE.2024.3491578 | - |
| dc.identifier.scopus | eid_2-s2.0-105003245320 | - |
| dc.identifier.volume | 51 | - |
| dc.identifier.issue | 4 | - |
| dc.identifier.spage | 879 | - |
| dc.identifier.epage | 903 | - |
| dc.identifier.eissn | 1939-3520 | - |
| dc.identifier.issnl | 0098-5589 | - |
