Papers1 provider · 1 record
December 9, 2025· 2025 7th International Conference on Advancements in Computing (ICAC)
conference-paper

Optimizing Gas Efficiency in Ethereum Smart Contracts Using Design Pattern Refinement and Complexity Reduction

Authors:K.S. WeedagamaarachchiH. D. VithanageH. M. S. N. DehipolaK.D.R. MandithaVishan JayasinghearachchiJeewaka Perera

Abstract

Smart contracts on the Ethereum blockchain enable automation and transparency in decentralized applications; however, their scalability is often constrained by high gas costs resulting from inefficient code design. This research investigates the relationship between cyclomatic code complexity and gas consumption, proposing a design pattern-based approach to optimize gas efficiency in Ethereum smart contracts. Three common Solidity patterns Factory, Registry, and State Machine were optimized using both existing and novel techniques, including variable packing, the use of fixed-size data types (uint256, bytes32), immutable variables, and mapping simplification. These optimizations were implemented and tested within a real-world coco peat supply chain management system to measure their impact on gas usage. Experimental results showed that deployment gas costs decreased by approximately 19 % and runtime execution gas by around 14 %, confirming that design-level optimization can significantly reduce costs without affecting functionality. The findings demonstrate that structured refinement of contract design can enhance scalability, making blockchainbased enterprise solutions more efficient and economically sustainable.

Community

0 comments
Use Connect Wallet in the navigation

No discussion yet

Be the first to share a question or observation.