MOVE Language Pioneer GAS Design: Full Analysis of On-Chain Resource Pricing and Fee Calculation

robot
Abstract generation in progress

MOVE Language's First GAS Design: On-chain GAS Fee Calculation Method

The early version of the MOVE language was originally intended to run in a no-GAS environment, and therefore was not prepared for a GAS plan. Recently, a blockchain project has implemented the first GAS plan for its MOVE language, which is referred to as "an adventure".

The GAS plan outlines the principles, processes, calculation methods, post-adjustments, and the attitude towards accepting community suggestions for formulating GAS.

Gas measurement is a fundamental concept of many blockchains, defining the abstract computation of the amount of computational and storage resources required to execute and store on-chain transactions. The GAS plan determines the cost of all executions on-chain, used to calculate the GAS expenditure during transaction execution.

process

To effectively execute, the process on-chain is:

  1. Definition Principles
  2. Prepare the evaluation framework and determine the price for each execution.
  3. Establish a GAS measurement system and secure GAS algebra for MOVE.
  4. Import upstream GAS framework
  5. Make the GAS framework storage-aware
  6. Further refine the GAS plan

principle

The defined principles include:

  1. Operating costs are directly related to available network resources, and GAS costs should decrease after technical improvements.
  2. GAS is set by on-chain governance and can be seamlessly configured.
  3. GAS can prevent DoS attacks and can be quickly adjusted according to network conditions.
  4. The GAS price reflects the desire for accelerated growth and maintaining the accessibility of the blockchain.
  5. Encourage making good choices in design, such as prioritizing security, modularity, and so on.

Calculate GAS

When users submit a transaction, they must specify two quantities:

  • Maximum GAS amount: The maximum number of GAS units that a user is willing to spend to execute a transaction.
  • GAS unit price: calculated in octal per unit of GAS, 1 octal = 0.00000001 native token

During the transaction execution process, a fee will be charged:

  1. Fixed Costs
  2. Execution Cost
  3. Read Cost
  4. Writing Cost

Final transaction fee = Total amount of GAS consumed × GAS unit price

Establish GAS schedule

  1. Basic settings: including transaction size and maximum GAS units.

  2. Transaction scale: Initially set to 32KB, later adjusted to 64KB.

  3. Maximum GAS unit: set to 1,000,000, affecting the duration of executable transactions.

  4. Execution: Evaluate execution costs through benchmark frameworks and analytical tools.

  5. Storage: Consider storage device bandwidth, IOPS capacity, and the cost of permanent disk usage.

Storage GAS fee = Project fee + ( byte fee × Number of bytes )

read, create and write

  • Read operation: the most common, calibrated according to disk IOPS and bandwidth capacity.
  • Create operation: highest cost, calibrated according to reference disk space.
  • Write operation: Updating existing items, byte cost is the same as creation

stable GAS unit cost

The fixed GAS unit cost helps to maintain the GAS plan unchanged, decoupled from the market value of native tokens. GAS units are represented with approximately three-digit precision.

Community Participation

Community members can:

  1. Point out the unreasonable aspects of the GAS plan.
  2. Participate in community discussions
  3. Vote on relevant governance proposals

GAS cost adjustment

The GAS plan can be changed through governance proposals. Sometimes it is necessary to update the node software and adopt new GAS feature flags.

Future Work

  1. Reduce execution costs
  2. Implement multi-dimensional GAS calculation
  3. Alleviating the issue of bloated state

The project is exploring the concept of TTL for each project, deleting unvisited state projects when the TTL expires.

MOVE-8.08%
View Original
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • 5
  • Repost
  • Share
Comment
0/400
SelfRuggervip
· 1h ago
You have to pay gas too, sob sob, no more free rides.
View OriginalReply0
GasFeeCriervip
· 08-12 17:37
This piece of incense cake can be exchanged for this amount of gas?
View OriginalReply0
ChainMaskedRidervip
· 08-12 17:35
Schrödinger's gas fee
View OriginalReply0
LuckyHashValuevip
· 08-12 17:35
Something is happening, the gas has changed again.
View OriginalReply0
degenwhisperervip
· 08-12 17:25
Is a world without gas really possible?
View OriginalReply0
Trade Crypto Anywhere Anytime
qrCode
Scan to download Gate app
Community
English
  • 简体中文
  • English
  • Tiếng Việt
  • 繁體中文
  • Español
  • Русский
  • Français (Afrique)
  • Português (Portugal)
  • Bahasa Indonesia
  • 日本語
  • بالعربية
  • Українська
  • Português (Brasil)