article
A smart contract is a program deployed on a blockchain network. It is secure, transparent, and immutable after deployment. Executing a smart contract requires gas to function. Gas is consumed during both deployment and transaction on the network. Optimizing gas consumption is one of the most difficult challenges to master. Many approaches have been proposed; however, it remains a significant a challenge. The purpose of this article is to explain gas consumption in the blockchain network and to present an approach for optimizing gas usage in a For() loop. This work was carried out in several stages, including: parsing solidity code according to its version, implementing a Control Flow Graph to identify loops to be optimized, and finally applying a smart contract code optimization algorithm. Our approach is robust, scalable, and easily adaptable. Experiments show that any syntactic or version change to a smart contract impacts gas consumption. The approach is practical and has distinctive characteristics. Its strength lies in its ability to optimize smart contracts across all solidity version from 0.5.x to 0.8.x.
This page summarises published work. The authoritative version sits with the publisher.
DOI: 10.1109/icecer65523.2025.11401079
Is something wrong with this record? Report it or request removal.
Discussion
Have you built on this work, tried to replicate it, or seen it applied in practice? Share what you know. Verified researchers and MARATTO™ domain experts can open a discussion, and any member can reply. Contributions are reviewed before they appear.
No discussion yet. Open the first thread.
New to MARATTO™? Create a free account.