Explore the Ethereum Concepts

2/22/2024, 5:31:36 AM
Beginner
Ethereum
This article provides an overview of Ethereum gas fees.

Forward the Original Title‘All You Need to Know about Ethereum Gas, Gas Limit, Gas Price, Gas Fee, Base Fee, Max Fee’

In Ethereum or other networks), to execute specific operations like sending tokens, storage, or token exchange, a certain amount of fuel is consumed, referred to as gas. This is similar to a car needing gasoline to run. In Ethereum, various interactions require the consumption of gas. For example:

Suppose driving from point A to point B requires 10 liters of gas, priced at $8 per liter. Then, the cost of gas from A to B would be: 10 * 8 = $80.

Similarly, in the Ethereum network, suppose executing the operation of sending tokens requires the consumption of 21,000 units of gas, with a price of 100 gwei per unit. The cost of executing this transaction would be: 21,000 * 100 = 2,100,000 gwei.

Why is Gas Needed?

We all know that a crucial strategy in web2 is providing services for free to attract traffic and achieve monetization. So, why doesn’t Ethereum follow the same approach in web3?

Charging gas fees not only serves as an incentive for rewarding miners but also acts as a deterrent against malicious attacks. Without gas fees, attackers could deploy numerous infinite-loop contracts and continuously run them by sending transactions, hijacking a significant portion of the network’s computational power and causing a system shutdown. By specifying gas consumption, Ethereum prevents malicious infinite loops, avoiding resource wastage. When all gas is consumed, the operation stops, similar to a car stopping when it runs out of gas, preventing further exploitation.

Gas Limit

What is Gas Limit?

In the earlier example, to calculate how much money was spent on gas from point A to point B, you needed to know the gas price per liter and the amount of gas consumed (liters used).

Similarly, in the Ethereum network, to calculate the cost (transaction fee) of a specific operation, you need to know the gas price and the amount of gas consumed.

The amount of gas to be consumed is set by the contract creator. Different contracts and different types of operations consume different amounts of gas. The more complex the operation, the more gas it requires. Therefore, estimating the exact gas consumption in advance is challenging. To address this, gas limit is set. Unutilized gas would be returned to the user.

When calculating the amount of gas consumed, wallet providers like Metamask often directly provide the gas limit. If the actual consumption amount is less than the gas limit, the remainder is refunded. If the actual consumption amount exceeds the gas limit, the transaction cannot be executed.

Suppose a Ethereum network transfer requires 21,000 units of gas, and the gas limit is set to 50,000, but only 21,000 is consumed in reality. Then, the remaining 29,000 will be automatically refunded. However, if the actual consumption is 51,000, and you’ve set the gas limit to 50,000, the transaction will not be successful, and the 50,000 gas will not be refunded.

Therefore, attempting to reduce transaction fees by decreasing the gas limit may have the opposite effect: the transaction might fail and the handling fee will still be deducted.

How is Gas Limit Determined?

The value of gas limit is generally automatically provided by wallet providers and usually does not need manual modification or adjustment.

Gas Price

What is Gas Price?

Gas price refers to the price/unit of gas, usually expressed in Gwei.

How to Determine Gas Price

After the London upgrade on August 5, 2021, gas price is divivded to two parts: the base fee and the max priority fee.

「1. Base fee」

The base fee is the basic cost. Each block has a base fee as the minimum price. To be included in a block, the gas price of a transaction must be greater than or equal to the base fee, which is decided by Ethereum itself. So we will not discuss the base fee here.

「2. Max priority fee」

In the mechanism of gas fees on the Ethereum network, similar to when you add tips during peak hours on a ride-hailing app, adding a tip may prioritize your transaction. It’s essential to note that the base fee changes in real-time based on network congestion and can be checked on websites, while the tip can be adjusted manually, generally higher but not lower.

「3. Max fee」

This is the maximum cost per unit of gas. The max fee is the absolute maximum amount you are willing to pay per unit of gas to confirm your transaction. In most cases, your actual transaction cost will be lower than the specified max fee, and your minimum gas price for the transaction is the current base fee. However, if the base fee increases while your transaction is not completed, your transaction might get stuck, fail, or be abandoned. Therefore, to achieve predictable transaction settlements under EIP-1559, it is currently considered best practice to set a max fee that anticipates an increase in the expected base fee.

The specific transaction information in the above image includes:

  • 1、Base fee: 27.630981243 Gwei
  • 2、Max priority fee: 0.01 Gwei
  • 3、Max fee: 57.802896536 Gwei
  • 4、Gas price: base fee + max priority = 27.640981243 Gwei
  • 5、Gas limit: 46,097
  • 6、Usage by Txn: 46,097 (Actual gas amount used in the transaction)
  • 7、Gas fee: gas price * Usage by Txn = 1274166.312358571 Gwei = 0.001274166312358571ETH

Disclaimer:

  1. This article is reprinted from [Web3星云], Forward the Original Title‘All You Need to Know about Ethereum Gas, Gas Limit, Gas Price, Gas Fee, Base Fee, Max Fee’,All copyrights belong to the original author [dogwang]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.

Share

Crypto Calendar

Project Updates
Etherex will launch the token REX on August 6.
REX
22.27%
2025-08-06
Rare Dev & Governance Day in Las Vegas
Cardano will host the Rare Dev & Governance Day in Las Vegas, from August 6 to 7, featuring workshops, hackathons and panel discussions focused on technical development and governance topics.
ADA
-3.44%
2025-08-06
Blockchain.Rio in Rio De Janeiro
Stellar will participate in the Blockchain.Rio conference, scheduled to be held in Rio de Janeiro, from August 5 to 7. The program will include keynotes and panel discussions featuring representatives of the Stellar ecosystem in collaboration with partners Cheesecake Labs and NearX.
XLM
-3.18%
2025-08-06
Webinar
Circle has announced a live Executive Insights webinar titled “The GENIUS Act Era Begins”, scheduled for August 7, 2025, at 14:00 UTC. The session will explore the implications of the newly passed GENIUS Act—the first federal regulatory framework for payment stablecoins in the United States. Circle’s Dante Disparte and Corey Then will lead the discussion on how the legislation impacts digital asset innovation, regulatory clarity, and the US’s leadership in global financial infrastructure.
USDC
-0.03%
2025-08-06
AMA on X
Ankr will host an AMA on X on August 7th at 16:00 UTC, focusing on DogeOS’s work in building the application layer for DOGE.
ANKR
-3.23%
2025-08-06

Related Articles

What Is Ethereum 2.0? Understanding The Merge
Intermediate

What Is Ethereum 2.0? Understanding The Merge

A change in one of the top cryptocurrencies that might impact the whole ecosystem
1/18/2023, 2:25:24 PM
Reflections on Ethereum Governance Following the 3074 Saga
Intermediate

Reflections on Ethereum Governance Following the 3074 Saga

The Ethereum EIP-3074/EIP-7702 incident reveals the complexity of its governance structure: in addition to the formal governance processes, the informal roadmaps proposed by researchers also have significant influence.
6/12/2024, 2:04:52 AM
An Introduction to ERC-20 Tokens
Beginner

An Introduction to ERC-20 Tokens

ERC-20 has emerged as the technical standard used for all smart contracts on the Ethereum Network.
1/12/2023, 2:48:54 PM
What is Neiro? All You Need to Know About NEIROETH in 2025
Intermediate

What is Neiro? All You Need to Know About NEIROETH in 2025

Neiro is a Shiba Inu Dog that inspired the launch of Neiro tokens across different blockchains. As of 2025, Neiro Ethereum (NEIROETH) has evolved into a leading meme coin with a $215 million market cap, 87,000+ holders, and listings on 12 major exchanges. The ecosystem now includes a DAO for community governance, an official merchandise store, and a mobile app. NEIROETH has implemented layer-2 solutions to enhance scalability and secured its position in the top 10 dog-themed meme coins by market capitalization, backed by a vibrant community and leading crypto influencers.
5/23/2025, 6:58:17 AM
Our Across Thesis
Intermediate

Our Across Thesis

This article analyzes the tremendous potential for the development of the Layer 2 (L2) market and the accompanying bridging needs among various L2 solutions. It delves into the current status, potential, and risks of the cross-chain protocol Across Protocol in this market.
1/5/2024, 1:34:41 AM
Jupiter in the Solana Ecosystem: Comprehensive Expansion from Swap Aggregation to Perpetual Contracts
Beginner

Jupiter in the Solana Ecosystem: Comprehensive Expansion from Swap Aggregation to Perpetual Contracts

Jupiter is a swap aggregator on the SOL ecosystem. This article introduces that the protocol includes DCA, cross-chain routing, Perp and other functions.
1/8/2024, 2:30:11 AM
Start Now
Sign up and get a
$100
Voucher!