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

  • BTC Falls Below $76,000

    Market data shows that BTC has fallen below $76,000, currently priced at $75,994.44, with a 24-hour decline of 0.01%. The market is experiencing significant fluctuations, so please ensure proper risk management.

  • Walsh's Fed Nomination Receives Sufficient Votes to Advance Review Process

    The U.S. Senate voted on the nomination of Walsh for Federal Reserve Chair. The Senate Banking Committee voted to advance Walsh's nomination to the full Senate.

  • Squads Secures $18 Million Strategic Financing Led by Solana Ventures

    Squads, a multi-signature protocol in the Solana ecosystem, has announced the completion of $18 million in strategic financing, led by Solana Ventures, with participation from Coinbase Ventures, Haun Ventures, L1D, and others, bringing the total funding to $42.9 million. This round of financing was completed in December of last year and was only recently made public. Squads' stablecoin payment platform, Altitude, allows businesses to conduct 24/7 global payment settlements in stablecoins through self-custody wallets, integrating into the global payment network with compliance and risk control systems.

  • MoonPay Acquires Crypto Security Startup Sodot for $100 Million in All-Stock Deal

    MoonPay has announced the acquisition of Israeli crypto security startup Sodot for $100 million in an all-stock transaction. Following the completion of this acquisition, Sodot will be integrated into MoonPay's newly established Institutional division. MoonPay Institutional is expected to provide a range of cryptocurrency and blockchain services to large traditional financial institutions, including trading, tokenized securities, payments, wallet management, and stablecoin issuance.

  • Belo Completes $14 Million Series A Financing Led by Tether

    On April 29, Latin American digital wallet Belo completed a $14 million Series A financing round, led by stablecoin issuer Tether, with participation from Titan Fund, The Venture City, Mindset Ventures, and G2. The company plans to use this funding to expand into Mexico, Chile, Colombia, Peru, Bolivia, and Paraguay, while deepening its business presence in Brazil, focusing on serving freelancers and remote workers engaged in cross-border payments. The goal is to reduce the costs and friction associated with cross-border payments and foreign exchange through stablecoin infrastructure.

  • BTC Falls Below $77,000

    Market data shows that BTC has fallen below $77,000, currently priced at $76,988.19, with a 24-hour increase of 0.2%. The market is highly volatile, so please ensure proper risk management.

  • Cyberspace Administration: Rapid Development of AI is Profoundly Changing Content Production

    On April 29, according to The Paper, the State Council Information Office held a press conference. At the meeting, Niu Yibing, Deputy Director of the Cyberspace Administration of China (CAC), stated that the rapid development of new artificial intelligence technologies is profoundly changing content production, dissemination methods, and interaction forms in cyberspace, while also presenting new era challenges for the construction of online civilization. Niu pointed out that the development of artificial intelligence provides new technical support and pathways for producing high-quality content, innovating online communication, and cultivating a civilized atmosphere. However, it also brings a series of new issues, situations, and challenges, such as the identification of false information, personal information protection, and ethical safety in AI applications, which need to be addressed with strengthened regulation and effective responses while promoting development. Since the beginning of this year, the CAC has focused on new technologies and applications of artificial intelligence, continuously enhancing institutional supply, and in collaboration with relevant departments, has issued the 'Interim Measures for the Management of Humanized Interactive Services of Artificial Intelligence' and publicly solicited opinions from society regarding the management measures for digital virtual human information services.

  • U.S. Senate to Vote Today on Confirmation of First Bitcoin-Supporting Federal Reserve Chair

    On April 29, the U.S. Senate will vote today to confirm the first Federal Reserve Chair who supports Bitcoin. This position oversees the world's largest central bank and is involved in the cryptocurrency sector. (The Bitcoin Historian)

  • US Spot Bitcoin ETF Sees $89.7 Million Net Outflow Yesterday

    On April 29, according to monitoring data from Farside Investors, the US spot Bitcoin ETF experienced a net outflow of $89.7 million yesterday.

  • US Spot Ethereum ETF Sees Net Outflow of $21.8 Million Yesterday

    On April 29, according to monitoring data from Farside Investors, the US spot Ethereum ETF experienced a net outflow of $21.8 million yesterday.