Benedikt Severin, M. Hesenius, F. Blum, Michael Hettmer, V. Gruhn
{"title":"智能金钱浪费:分析以太坊智能合约的Gas成本驱动因素","authors":"Benedikt Severin, M. Hesenius, F. Blum, Michael Hettmer, V. Gruhn","doi":"10.1109/ICSME55016.2022.00034","DOIUrl":null,"url":null,"abstract":"Users must pay a fee depending on resource consumption when using smart contracts on the Ethereum blockchain. As even the most basic operations cost several dollars under moderate network load, developers may actively reduce user-paid fees by optimizing the smart contract resource consumption (’gas costs’). Previous works suggested patterns and tools supporting developers in gas cost optimization, but up to now a comprehensive analysis of their real-world impact is missing. Another gap is the maintenance and evolution support for smart contracts leveraging the publicly available usage data. We propose high-level gas cost profiles and review which profiles are considered in the existing literature. Additionally, we sampled around 68,000 smart contract interactions from three years, analyzed them using the gas cost profiles, and compare the findings to the current focus in literature. In our data set, external code, storage, and the transaction base fee are first-level cost drivers in terms of absolute gas usage, but contract deployment becomes also costly when considering the average gas usage per transaction. Our analysis also shows that plenty of previous work focused cost categories barely influencing resource consumption.","PeriodicalId":300084,"journal":{"name":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","volume":"29 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":"{\"title\":\"Smart Money Wasting: Analyzing Gas Cost Drivers of Ethereum Smart Contracts\",\"authors\":\"Benedikt Severin, M. Hesenius, F. Blum, Michael Hettmer, V. Gruhn\",\"doi\":\"10.1109/ICSME55016.2022.00034\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Users must pay a fee depending on resource consumption when using smart contracts on the Ethereum blockchain. As even the most basic operations cost several dollars under moderate network load, developers may actively reduce user-paid fees by optimizing the smart contract resource consumption (’gas costs’). Previous works suggested patterns and tools supporting developers in gas cost optimization, but up to now a comprehensive analysis of their real-world impact is missing. Another gap is the maintenance and evolution support for smart contracts leveraging the publicly available usage data. We propose high-level gas cost profiles and review which profiles are considered in the existing literature. Additionally, we sampled around 68,000 smart contract interactions from three years, analyzed them using the gas cost profiles, and compare the findings to the current focus in literature. In our data set, external code, storage, and the transaction base fee are first-level cost drivers in terms of absolute gas usage, but contract deployment becomes also costly when considering the average gas usage per transaction. Our analysis also shows that plenty of previous work focused cost categories barely influencing resource consumption.\",\"PeriodicalId\":300084,\"journal\":{\"name\":\"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)\",\"volume\":\"29 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2022-10-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"2\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICSME55016.2022.00034\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 IEEE International Conference on Software Maintenance and Evolution (ICSME)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICSME55016.2022.00034","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Smart Money Wasting: Analyzing Gas Cost Drivers of Ethereum Smart Contracts
Users must pay a fee depending on resource consumption when using smart contracts on the Ethereum blockchain. As even the most basic operations cost several dollars under moderate network load, developers may actively reduce user-paid fees by optimizing the smart contract resource consumption (’gas costs’). Previous works suggested patterns and tools supporting developers in gas cost optimization, but up to now a comprehensive analysis of their real-world impact is missing. Another gap is the maintenance and evolution support for smart contracts leveraging the publicly available usage data. We propose high-level gas cost profiles and review which profiles are considered in the existing literature. Additionally, we sampled around 68,000 smart contract interactions from three years, analyzed them using the gas cost profiles, and compare the findings to the current focus in literature. In our data set, external code, storage, and the transaction base fee are first-level cost drivers in terms of absolute gas usage, but contract deployment becomes also costly when considering the average gas usage per transaction. Our analysis also shows that plenty of previous work focused cost categories barely influencing resource consumption.