Demystification and Near-perfect Estimation of Minimum Gas Limit and Gas Used for Ethereum Smart Contracts
- URL: http://arxiv.org/abs/2501.04483v1
- Date: Wed, 08 Jan 2025 13:07:34 GMT
- Title: Demystification and Near-perfect Estimation of Minimum Gas Limit and Gas Used for Ethereum Smart Contracts
- Authors: Danilo Rafael de Lima Cabral, Pedro Antonino, Augusto Sampaio,
- Abstract summary: Two central concepts of this system are the emphgas limit assigned by the issuer of a transaction and the emphgas used by a transaction.
Despite its practical relevance, this concept has not been properly addressed.
This paper proposes a precise notion of minimum gas limit and how it can differ from gas used by a transaction.
- Score: 0.3277163122167433
- License:
- Abstract: The Ethereum blockchain has a \emph{gas system} that associates operations with a cost in gas units. Two central concepts of this system are the \emph{gas limit} assigned by the issuer of a transaction and the \emph{gas used} by a transaction. The former is a budget that must not be exhausted before the completion of the transaction execution; otherwise, the execution fails. Therefore, it seems rather essential to determine the \emph{minimum gas limit} that ensures the execution of a transaction will not abort due to the lack of gas. Despite its practical relevance, this concept has not been properly addressed. In the literature, gas used and minimum gas limit are conflated. This paper proposes a precise notion of minimum gas limit and how it can differ from gas used by a transaction; this is also demonstrated with a quantitative study on real transactions of the Ethereum blockchain. Another significant contribution is the proposition of a fairly precise estimator for each of the two metrics. Again, the confusion between these concepts has led to the creation of estimators only for the gas used by a transaction. We demonstrate that the minimum gas limit for the state of the Ethereum blockchain (after the block) $t$ can serve as a near-perfect estimation for the execution of the transaction at block $t + \Delta$, where $\Delta \leq 11$; the same holds for estimating gas used. These precise estimators can be very valuable in helping the users predict the gas budget of transactions and developers in optimising their smart contracts; over and underestimating gas used and minimum gas limit can lead to a number of practical issues. Overall, this paper serves as an important reference for blockchain developers and users as to how the gas system really works.
Related papers
- Zaptos: Towards Optimal Blockchain Latency [52.30047458198369]
We introduce Zaptos, a parallel pipelined architecture designed to minimize end-to-end latency.
Zaptos achieves a throughput of 20,000 transactions per second with sub-second latency.
arXiv Detail & Related papers (2025-01-18T00:22:22Z) - BlockFound: Customized blockchain foundation model for anomaly detection [47.04595143348698]
BlockFound is a customized foundation model for anomaly blockchain transaction detection.
We introduce a series of customized designs to model the unique data structure of blockchain transactions.
BlockFound is the only method that successfully detects anomalous transactions on Solana with high accuracy.
arXiv Detail & Related papers (2024-10-05T05:11:34Z) - The Latency Price of Threshold Cryptosystem in Blockchains [52.359230560289745]
We study the interplay between threshold cryptography and a class of blockchains that use Byzantine-fault tolerant (BFT) consensus protocols.
Existing approaches for threshold cryptosystems introduce a latency overhead of at least one message delay for running the threshold cryptographic protocol.
We propose a mechanism to eliminate this overhead for blockchain-native threshold cryptosystems with tight thresholds.
arXiv Detail & Related papers (2024-07-16T20:53:04Z) - Saving proof-of-work by hierarchical block structure [0.0]
We argue that the current POW based consensus algorithm of the Bitcoin network suffers from a fundamental economic discrepancy.
We propose making the computational cost of securing the txns proportional to the wealth being transferred.
arXiv Detail & Related papers (2024-04-23T12:01:48Z) - How to Save My Gas Fees: Understanding and Detecting Real-world Gas
Issues in Solidity Programs [8.282190390923406]
Execution of smart contracts incurs a fee called gas fee for its computation and data-store consumption.
When programmers develop smart contracts, they could unknowingly write code snippets that unnecessarily cause more gas fees.
This paper takes the initiative in helping users reduce their gas fees in two important steps.
arXiv Detail & Related papers (2024-03-05T05:12:10Z) - Lazy Contracts: Alleviating High Gas Costs by Secure and Trustless Off-chain Execution of Smart Contracts [0.0]
In most programmable blockchains, the notion of gas is introduced to prevent DoS attacks.
A fixed cost to each atomic operation, and the initiator of a function call pays the total gas cost as a transaction fee.
This thesis proposes "lazy contracts" as a solution to alleviate these costs.
arXiv Detail & Related papers (2023-09-20T13:41:45Z) - Masquerade: Simple and Lightweight Transaction Reordering Mitigation in Blockchains [5.690884793952696]
We propose an MEV aware protocol design called Masquerade to increase user satisfaction and confidence in the system.
We introduce the notion of a "token" to mitigate the actions taken by an adversary in an attack scenario.
arXiv Detail & Related papers (2023-08-29T14:42:43Z) - Blockchain Large Language Models [65.7726590159576]
This paper presents a dynamic, real-time approach to detecting anomalous blockchain transactions.
The proposed tool, BlockGPT, generates tracing representations of blockchain activity and trains from scratch a large language model to act as a real-time Intrusion Detection System.
arXiv Detail & Related papers (2023-04-25T11:56:18Z) - Weakly-Supervised Physically Unconstrained Gaze Estimation [80.66438763587904]
We tackle the previously unexplored problem of weakly-supervised gaze estimation from videos of human interactions.
We propose a training algorithm along with several novel loss functions especially designed for the task.
We show significant improvements in (a) the accuracy of semi-supervised gaze estimation and (b) cross-domain generalization on the state-of-the-art physically unconstrained in-the-wild Gaze360 gaze estimation benchmark.
arXiv Detail & Related papers (2021-05-20T14:58:52Z) - Quantum Multi-Solution Bernoulli Search with Applications to Bitcoin's
Post-Quantum Security [67.06003361150228]
A proof of work (PoW) is an important cryptographic construct enabling a party to convince others that they invested some effort in solving a computational task.
In this work, we examine the hardness of finding such chain of PoWs against quantum strategies.
We prove that the chain of PoWs problem reduces to a problem we call multi-solution Bernoulli search, for which we establish its quantum query complexity.
arXiv Detail & Related papers (2020-12-30T18:03:56Z) - BatPay: a gas efficient protocol for the recurrent micropayment of ERC20
tokens [0.35132824436572674]
BatPay is a proxy scaling solution for the transfer of ERC20 tokens.
It is suitable for micropayments in one-to-many and few-to-many scenarios.
arXiv Detail & Related papers (2020-02-06T15:43:52Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.