Saving gas with a packaging framework for Ethereum transactions
Resumo
Transaction costs are a barrier to the wide adoption of decentralized applications. To address this issue, this paper proposes a framework to optimize transaction fees by carrying out a conflict-avoiding packaging of multiple smart-contract calls into a single transaction. It relies on two main concepts: a way to optimize the bundling of transactions with a conflict-avoiding packaging strategy and a way to execute such bundles with a package-processing methodology. We illustrate our framework and the gas economy it can bring with a case study where we analyze a popular Ethereum smart contract.
Referências
Albert, E., Correas, J., Gordillo, P., Román-Díez, G., and Rubio, A. (2020). Gasol: Gas analysis and optimization for ethereum smart contracts. In Tools and Algorithms for the Construction and Analysis of Systems: 26th International Conference, TACAS 2020, pages 118–125. Springer.
Antonopoulos, A. M., Osuntokun, O., and Pickhardt, R. (2021). Mastering the Lightning Network. ”O’Reilly Media, Inc.”.
Buterin, V. (2016). What is ethereum? Ethereum Official webpage. Available: [link].
Chen, T., Li, X., Luo, X., and Zhang, X. (2017). Under-optimized smart contracts devour your money. In 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER), pages 442–446. IEEE.
Cheng, R. and Zhang, F. (2019). Ekiden: A platform for confidentiality-preserving, trustworthy, and performant smart contracts. In 2019 IEEE European Symposium on Security and Privacy (EuroS&P), pages 185–200. IEEE.
Dziembowski, S., Faust, S., and Hostáková, K. (2018). General state channel networks. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 949–966.
Ganache (2022). https://trufflesuite.com/docs/ganache/. Accessed: 2022-05-22.
Google Bigtable (2022). https://cloud.google.com/bigtable/docs/overview. Accessed: 2022-05-22.
Hughes, W., Russo, A., and Schneider, G. (2021). Multicall: A transaction-batching interpreter for ethereum. In Proceedings of the 3rd ACM International Symposium on Blockchain and Secure Critical Infrastructure, pages 25–35.
Kokoris-Kogias, E., Jovanovic, P., Gasser, L., Gailly, N., Syta, E., and Ford, B. (2018). Omniledger: A secure, scale-out, decentralized ledger via sharding. In 2018 IEEE Symposium on Security and Privacy (SP), pages 583–598. IEEE.
Li, C. (2021). Gas estimation and optimization for smart contracts on ethereum. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 1082–1086. IEEE.
Luu, L., Narayanan, V., Zheng, C., Baweja, K., Gilbert, S., and Saxena, P. (2016). A secure sharding protocol for open blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, page 17–30.
Marchesi, L., Marchesi, M., Destefanis, G., Barabino, G., and Tigano, D. (2020). Design patterns for gas optimization in ethereum. pages 9–15. IEEE.
Miller, A., Bentov, I., Kumaresan, R., and McCorry, P. (2017). Sprites: Payment channels that go faster than lightning. CoRR, abs/1702.05812.
Multisend (2023). https://github.com/gnosis/ethers-multisend. Accessed: 2023-05-30.
Paper repository (2023). https://github.com/medeirosbm/ coloquio-sbs-2023. 2023.
TetherToken website. https://tether.to/. Accessed: 2022-05-22.
Truffle. https://trufflesuite.com/docs/truffle/. Accessed: 2022-05-22.
Wang, Y., Zhang, Q., Li, K., Tang, Y., Chen, J., Luo, X., and Chen, T. (2021). ibatch: saving ethereum fees via secure and cost-effective batching of smart-contract invocations. pages 566–577.
Antonopoulos, A. M., Osuntokun, O., and Pickhardt, R. (2021). Mastering the Lightning Network. ”O’Reilly Media, Inc.”.
Buterin, V. (2016). What is ethereum? Ethereum Official webpage. Available: [link].
Chen, T., Li, X., Luo, X., and Zhang, X. (2017). Under-optimized smart contracts devour your money. In 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER), pages 442–446. IEEE.
Cheng, R. and Zhang, F. (2019). Ekiden: A platform for confidentiality-preserving, trustworthy, and performant smart contracts. In 2019 IEEE European Symposium on Security and Privacy (EuroS&P), pages 185–200. IEEE.
Dziembowski, S., Faust, S., and Hostáková, K. (2018). General state channel networks. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, pages 949–966.
Ganache (2022). https://trufflesuite.com/docs/ganache/. Accessed: 2022-05-22.
Google Bigtable (2022). https://cloud.google.com/bigtable/docs/overview. Accessed: 2022-05-22.
Hughes, W., Russo, A., and Schneider, G. (2021). Multicall: A transaction-batching interpreter for ethereum. In Proceedings of the 3rd ACM International Symposium on Blockchain and Secure Critical Infrastructure, pages 25–35.
Kokoris-Kogias, E., Jovanovic, P., Gasser, L., Gailly, N., Syta, E., and Ford, B. (2018). Omniledger: A secure, scale-out, decentralized ledger via sharding. In 2018 IEEE Symposium on Security and Privacy (SP), pages 583–598. IEEE.
Li, C. (2021). Gas estimation and optimization for smart contracts on ethereum. In 2021 36th IEEE/ACM International Conference on Automated Software Engineering (ASE), pages 1082–1086. IEEE.
Luu, L., Narayanan, V., Zheng, C., Baweja, K., Gilbert, S., and Saxena, P. (2016). A secure sharding protocol for open blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS ’16, page 17–30.
Marchesi, L., Marchesi, M., Destefanis, G., Barabino, G., and Tigano, D. (2020). Design patterns for gas optimization in ethereum. pages 9–15. IEEE.
Miller, A., Bentov, I., Kumaresan, R., and McCorry, P. (2017). Sprites: Payment channels that go faster than lightning. CoRR, abs/1702.05812.
Multisend (2023). https://github.com/gnosis/ethers-multisend. Accessed: 2023-05-30.
Paper repository (2023). https://github.com/medeirosbm/ coloquio-sbs-2023. 2023.
TetherToken website. https://tether.to/. Accessed: 2022-05-22.
Truffle. https://trufflesuite.com/docs/truffle/. Accessed: 2022-05-22.
Wang, Y., Zhang, Q., Li, K., Tang, Y., Chen, J., Luo, X., and Chen, T. (2021). ibatch: saving ethereum fees via secure and cost-effective batching of smart-contract invocations. pages 566–577.
Publicado
06/08/2023
Como Citar
OLIVEIRA, Bruno Medeiros de; ANTONINO, Pedro; SAMPAIO, Augusto.
Saving gas with a packaging framework for Ethereum transactions. In: COLÓQUIO EM BLOCKCHAIN E WEB DESCENTRALIZADA (CBLOCKCHAIN), 1. , 2023, João Pessoa/PB.
Anais [...].
Porto Alegre: Sociedade Brasileira de Computação,
2023
.
p. 67-72.
DOI: https://doi.org/10.5753/cblockchain.2023.231560.