Cointime

Download App
iOS & Android

How to purchase Ethereum GAS in advance

From ethresearch by web3skeptic

Abstract

This topic introduces a method for purchasing gas on Ethereum. Technically it is a fully on-chain Ethereum gas futures market. The volatility of gas prices, primarily driven by network demand fluctuations, significantly obstructs user experience on Ethereum due to unpredictable costs. This solution aims to mitigate that issue.

Protocol Description

General

The protocol users might be divided into to parties, gas purchasers (Purchaser) and gas providers (Executors)

The general protocol workflow has these stages:

  1. Purchaser: Listing order
  2. Executor: Accepting order
  3. Purchaser: Requesting transaction execution
  4. Executor: Executing transaction
  5. Anyone: Liquidating executor

Listing order

It is required to place order conditions onchain regarding the execution timeframe, gas price, and the expected security from the Executor, also the Purchaser locks the reward tokens responsible of paying the gas: gasCost * gasAmount.

The GasOrder should include such fields:

struct GasOrder { uint256 gasAmount; // The amount of Gas to book for future executions uint256 executionPeriodStart; // Start timestamp when it is possible to use the gas within the order uint256 executionPeriodDeadline; // End timestamp when it is possible to use the gas within the order uint256 executionWindow; // This variable defines a window, measured in blocks, within which a // transaction must be executed. This constraint is designed to optimize timing and prevent delays, while // also safeguarding against the exploitation of gas price fluctuations by malicious actors. TokenTransfer gasCost; // The cost of one Gas unit TokenTransfer guarantee; // The guarantee security required from the Executor }

Accepting order

Some Executor accept the conditions of the GasOrder, and locks the guarantee. The guarantee security is execpected to be proportional to the purchased amount of Gas.

Requesting transaction execution

When the GasOrder execution timeframe comes, the user might request transaction execution by signing the data structure with the transaction details.

Message { address from; uint256 nonce; uint256 gasOrder; // number of the employed order uint256 deadline; // deadline of the msg execution, should be within the range of order execution address to; // the contract which is being called uint256 gas; // gas limit to spend uint256 tips; // tips to the party which pushes the tx request onchain bytes data; // execution request details bytes signature; // the signature by the sender }

After the transaction is signed the hash of it should be published onchain. It might be done by transaction requester itself, or by anyone else. To incentives the posting the transaction request onchain the signer specifies the tips. The tips represents the Gas within the GasOrder which will be burned and the respective share of reward will be directed to the transaction request submitter.

Executor takes the signed data and calls the to contract from function within the protocol which executes the call with the data from the Message. Consecuently the call unlocks the share of the reward and the guarantee for the Executor.

If the transaction is not Executed because it is not profitable for the Executor than the Executor might be liquidated, it might be implemented in few ways, centralized and decentralized, lets review the decentralized version.

Decentralized liquidation logic

During the transaction request, the transaction hash is posted on-chain, also the signature and remaining Message data posted as a calldata to be publicly available.

If the Executor fails to execute the transaction before the Message.deadline, anyone can do so by providing the necessary data from the Message before the deadline + CONSTANT_LIQUIDATION_TIME. In return, the executor’s guarantee is partially forfeited, and the Liquidator requester receives a reward.

Bottlenecks

Executor incentive

Executor incentives rely on adjusting GasCost to accommodate risk. As gas prices are unpredictable, Executors mitigate risks by charging extra. This flexible pricing model, determined by Executors, may evolve from sporadic agreements to a more standardized market, resulting in better price averages over time.

Gas consumption

The protocol’s viability hinges on surpassing a certain threshold, as it necessitates gas for order publication, acceptance, signature verification, and transaction execution.

Split of liquidity

Tokenizing each Gas order is straightforward, yet trading shares between orders poses a challenge due to their differing parameters. While securitization of long-term orders seems a plausible solution, preventing liquidity fragmentation remains elusive at present.

Lock of guarantee

Executors must lock guarantees to deter liquidation risks, yet this restricts their flexibility. The locked guarantee could otherwise be utilized for liquidity elsewhere to generate yield. One potential solution is to lock tokens which represent shares in farming pools, enabling yield generation while locked. However, this introduces additional risks for gas Purchasers parties, as farming protocols entail additional security assumptions and associated risks.

P.S. I’m really interested to get the feedback on the proposed mechanism

Comments

All Comments

Recommended for you

  • Ethereum Foundation Stakes $46.2 Million in ETH

    On March 30, Arkham monitoring reported that the Ethereum Foundation has just staked $46.2 million worth of ETH, marking the largest amount of ETH staked in the foundation's history.

  • US Special Forces May Participate in Island Seizure or Iran Nuclear Tasks

    On March 30, according to a report by the New York Times on March 29, two U.S. military officials revealed that hundreds of U.S. special operations personnel have arrived in the Middle East, including Army Rangers and Navy SEALs, to provide 'more options' for U.S. military actions against Iran. The report states that these special operations forces have not yet been assigned specific tasks, but as professional ground combat units, they may be involved in operations related to the Strait of Hormuz, Hark Island, or Iran's nuclear facilities. (CCTV International News)

  • FTSE China A50 Index Futures Turn Positive

    On March 30, FTSE China A50 Index futures turned positive after previously dropping more than 1%. (Jin Shi)

  • Trump Claims Iran Has Agreed to Most of the '15-Point Plan'

    On March 30, CNN reported that U.S. President Trump stated that Iran has agreed to most of the content in the ceasefire '15-point plan'. (Xinhua News Agency)

  • BTC Surpasses $67,000

    Market data shows that BTC has surpassed $67,000, currently priced at $67,017.45, with a 24-hour increase of 0.44%. The market is experiencing significant fluctuations, so please ensure proper risk management.

  • Trump: US Will Act Swiftly if Iran Charges Fees in Strait of Hormuz

    On March 30, when asked about Iran's plans to charge fees in the Strait of Hormuz, US President Trump stated that he needed to confirm the validity of this information, but that the US could terminate such actions very quickly. "We can complete this task in two minutes. We can do it so swiftly that you would feel dizzy," he said. He noted that Saudi Arabia, Qatar, the UAE, and Bahrain are retaliating against Iran. "I was very surprised by their attack. But once attacked, they retaliated effectively. We have very strong communication, but people from all these countries say they have been fighting all along," he added. (Jinshi)

  • A-shares Trading Volume Exceeds 500 Billion Yuan

    On March 30, the trading volume of the Shanghai and Shenzhen stock exchanges exceeded 500 billion yuan, an increase of 86.4 billion yuan compared to the same time the previous day. (Jin Shi)

  • Trump: Iran Has Allowed 20 Tankers to Pass Through the Strait of Hormuz

    On March 30, U.S. President Trump stated on the 29th that Iran allowed 10 tankers flying the Pakistani flag to pass through the Strait of Hormuz last week, and the number has now increased to 20. He told the Financial Times, 'These tankers have set sail and are heading straight through the center of the strait.' The decision was approved by Iran's Islamic Parliament Speaker Ghalibaf. (Xinhua)

  • China's AI Model Usage Surges Nearly 34% Month-on-Month, Outpacing the U.S. for Four Consecutive Weeks

    On March 30, according to the latest data from institutions, the total global usage of AI large models reached 22.7 trillion tokens last week, reflecting an 11.2% month-on-month increase. Among the listed AI models, the weekly usage of Chinese AI models rose to 9.857 trillion tokens, marking a 33.94% increase from the previous week; the weekly usage of U.S. AI models was 3.007 trillion tokens, with a month-on-month growth of 1.79%. The weekly usage of Chinese AI models has increased for four consecutive weeks, consistently surpassing that of the U.S. In the past week, the top four global usage rankings were all occupied by Chinese AI models. Xiaomi's MiMo-V2-Pro maintained its top position with a weekly usage of 3.96 trillion tokens; Step 3.5 Flash (free) ranked second with a weekly usage of 1.49 trillion tokens; MiniMax M2.7 entered the rankings at third place with a weekly usage of 1.29 trillion tokens; and DeepSeek V3.2 ranked fourth with a weekly usage of 1.24 trillion tokens, reflecting an 8.7% increase. Meanwhile, MiniMax M2.5, which ranked third the previous week, fell to ninth place, nearly dropping out of the rankings, with a weekly usage of 0.909 trillion tokens, down 30% month-on-month. (Dongxin News Agency)

  • Over $313 Million Liquidated in the Past 24 Hours

    According to Coinglass data, over the past 24 hours, a total of $313 million has been liquidated across the network, with long positions accounting for $238 million and short positions for $74.7256 million. Among these, Bitcoin long positions saw liquidations of $89.9706 million, while Bitcoin short positions were liquidated for $30.4691 million. Ethereum long positions faced liquidations of $69.7201 million, and Ethereum short positions were liquidated for $21.9023 million. Additionally, in the last 24 hours, a total of 89,935 individuals were liquidated globally, with the largest single liquidation occurring on Bybit-BTCUSD valued at $9.8018 million.