🎉 The #CandyDrop Futures Challenge is live — join now to share a 6 BTC prize pool!
📢 Post your futures trading experience on Gate Square with the event hashtag — $25 × 20 rewards are waiting!
🎁 $500 in futures trial vouchers up for grabs — 20 standout posts will win!
📅 Event Period: August 1, 2025, 15:00 – August 15, 2025, 19:00 (UTC+8)
👉 Event Link: https://www.gate.com/candy-drop/detail/BTC-98
Dare to trade. Dare to win.
The MOVE language pioneers the GAS mechanism: a detailed explanation of on-chain resource consumption calculation.
The First GAS Mechanism Design of MOVE Language: Detailed Explanation of On-Chain GAS Consumption Calculation
On October 14, an important breakthrough in blockchain technology was announced. This is the first design of the GAS mechanism in the MOVE language, officially referred to as "an adventure." The mechanism defines an abstract computational method for the amount of computing and storage resources required to execute and store on-chain transactions, used to calculate GAS consumption during the execution of transactions.
Design Process
To execute effectively, the design team followed the process below:
Design Principles
The main principles include:
GAS Calculation Method
When the user submits a transaction, two quantities must be specified:
During the transaction execution, the following will be charged:
Final transaction fee = Total amount of GAS consumed * GAS unit price
For example, if a transaction consumes 670 GAS units and the user-specified GAS price is 100 Octa/unit, then the final fee is 670 * 100 = 67000 Octa = 0.00067 APT.
If the transaction execution runs out of GAS, the sender will be charged the maximum amount of GAS, and all changes to the transaction will be revoked.
GAS Plan Table Construction
1. Basic Configuration
The GAS plan includes some components that are unrelated to individual operations, such as transaction size and maximum GAS units.
2. Transaction Scale
Most transactions are at the kilobyte level, but the released MOVE module can reach several kilobytes. Currently, the transaction size limit is set to 64KB, balancing size and accessibility.
3. Maximum GAS unit
Define the maximum operable amount for a single transaction, set at 1,000,000. Even with the maximum framework upgrade, it will use less than 90%.
4. Execution Cost Assessment
Estimate the relative costs of all MOVE instructions and native functions using the benchmark framework and Valgrind analysis tool. Consider system robustness and security to arrive at the final number of executed instructions.
5. Storage Cost
Consider the bandwidth, IOPS capacity, and permanent occupancy costs of the storage device to design the storage GAS plan. The basic formula is:
Storage GAS fee = Project fee + ( byte fee * Number of bytes )
read, create, and write operations
Defines 6 GAS parameters that constitute the total fee:
Stable GAS Unit Cost
Fixed GAS unit costs help maintain the stability of the GAS plan. The team represents GAS units with approximately three-digit precision, such as the transfer transaction cost of about 700 GAS units.
Community Participation
As a community project, members can:
GAS Cost Adjustment
The GAS plan serves as on-chain configuration storage and can be changed through governance proposals. Designed to be scalable, allowing upgrades. Complex changes require updating node software and achieving widespread adoption, ultimately approved through governance proposals.
Future Work
As the first viable GAS framework for MOVE, future work includes:
The team is exploring the TTL concept for each project, deleting unvisited state projects when the TTL expires.