Gas Optimization Patterns in Move Smart Contracts on the Aptos Blockchain
Abstract
The Move language provides superior security and verifiability compared to existing smart contract languages such as Solidity. As the language becomes more popular, gas optimization will become an important field of research. This paper presents the first work on gas optimization in the Move language. We chose Aptos as the underlying platform for our analysis since it is the leading Move-enabled blockchain platform, and it was the first to develop a gas meter. In this paper, we describe Aptos' gas meter in detail. Then, we analyze the vast research on gas optimization in Solidity, and explore how it can be implemented in the Move language. Finally, this paper proposes 11 gas optimization patterns and principles for the Move language, presents 5 patterns that decrease the time complexity of the smart contract but have no effect on gas consumption, and implements a sample smart contract for each proposed gas optimization pattern. Our results show that the proposed patterns reduce gas consumption in a typical smart contract by 7 – 56%.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.