Gas Cost Analysis of Proxy and Diamond Patterns: Towards Trusted Smart Contract Engineering in EVM Blockchains
Authors:
- Tucci-Piergiovanni SaraTSTucci-Piergiovanni Sara
Preprint
Abstract
Blockchain applications are witnessing rapid evolution, necessitating the integration of upgradeable smart contracts. Software patterns have been proposed to summarize upgradeable smart contract best practices. However, research is missing on the comparison of these upgradeable smart contract patterns, especially regarding gas costs related to deployment and execution. This study aims to provide an in-depth analysis of gas costs associated with two prevalent upgradeable smart contract patterns: the Proxy and diamond patterns. The Proxy pattern utilizes a Proxy pointing to a logic contract, while the diamond pattern enables a Proxy to point to multiple logic contracts. We conduct a comparative analysis of gas costs for both patterns in contrast to a traditional non-upgradeable smart contract. We derive from this analysis a theoretical contribution in the form of two consolidated blockchain patterns and a corresponding decision model. By so doing we hope to contribute to the broader understanding of upgradeable smart contract patterns.Keywords
All Related Versions
This publication has 11 references indexed in Scilit:
- A large-scale exploratory study on the proxy pattern in EthereumEmpirical Software Engineering, 2024
- Storage State Analysis and Extraction of Ethereum Blockchain Smart ContractsACM Transactions on Software Engineering and Methodology, 2023
- A Review of Upgradeable Smart Contract Patterns based on OpenZeppelin TechniqueThe Journal of The British Blockchain Association, 2023
- Challenges and Common Solutions in Smart Contract DevelopmentIEEE Transactions on Software Engineering, 2022
- A Blockchain-Based Architecture for Trust in Collaborative Scientific ExperimentationJournal of Grid Computing, 2022
- Profiling gas consumption in solidity smart contractsJournal of Systems and Software, 2022
- Blockchain software patterns for the design of decentralized applications: A systematic literature reviewBlockchain: Research and Applications, 2022
- Design Patterns for Gas Optimization in Ethereum2020
- A Review on Blockchain Technology and Blockchain Projects Fostering Open ScienceFrontiers in Blockchain, 2019
- A Pattern Language: Towns, Buildings, ConstructionLeonardo, 1981