• blockchain&beyond
  • articles
  • 11 Apr 25

Gas (Ethereum): What are gas fees and how they work on the Ethereum blockchain

Understand Ethereum gas fees—what they are, how they work, and why they’re essential for transactions on the Ethereum blockchain.

0

alir1272
  • rating +2
  • subscribers 4

If you ever made a transaction in the Ethereum network, you may have been surprised how much gas crypto you needed just to make the payment go through.

Gas crypto is the cryptocurrency you need to pay in order for your transaction to be completed. Think of gas as the representation of computational effort required to make smart contracts work and process transactions within the network. It is used to compensate the Ethereum validators for their work, and it helps with maintaining the network.

In this guide, we will talk in detail about what gas is, how it works, why the fees tend to vary, and what you can do to optimize the costs when using the Ethereum network.

What is Gas in Ethereum?

To understand what are gas fees in crypto, let’s talk about what gas is first. You can think of gas as the “fuel” needed to make transactions happen in Ethereum’s network. Pretty much all activities within the Ethereum network need to be paid for through gas fees, whether you are transferring ETH, using dApps, executing smart contracts, or otherwise, you must fuel it with gas.

Beyond just fueling transactions and other activities, gas also plays a major role in Ethereum’s security and efficiency. Since doing anything costs gas, this system is useful for preventing spam and overuse of the network, stopping bad actors from overloading it with meaningless transactions.

As for efficiency, users can pay more to make their transactions more attractive to those in charge of processing them, which is how urgent and high-value transitions are processed before the smaller ones. And, of course, gas is also used as a way to reward validators for performing their role in the network.

Ethereum’s gas model is unique to the Ethereum network, and it is different from both Bitcoin and other Layer-1 chains in the crypto industry. For example, bitcoin has fixed fees which depend on the data size, and other chains use a variety of models depending on their technology, while Ethereum gas depends on computational effort.

How Ethereum Gas Fees Are Calculated

To understand Ethereum transactions better, let’s take a look at how you pay for gas, what do you actually pay, and how to calculate gas in blockchain.

Understanding Gas Units and Gwei

To start with, let’s talk about what is gwei. Simply put, Ethereum transaction costs are priced in a subunit of ETH called gwei, where each gwei is equal to 0.000000001 ETH.

It was created to measure gas prices since ETH is an asset with high value. So, with that in mind, if the cost of gas for completing the transaction is 30 gwei, that means that you need to pay 0.000000030 ETH.

It is also worth noting that there is something called a gas limit, which is the limit to how much gas you can pay in order for your transaction to be processed sooner. This is important because different actions have different gas limits. So, for example, a regular ETH transaction could cost around 21,000 gwei, while minting an NFT would be much more expensive, costing anywhere from 200,000 gwei to 600,000 gwei.

You can adjust your own gas limit manually, but keep in mind that if your gas limit is too low, your transaction could fail, even though the gas was already paid. In this situation, you would be wasting your gwei.

Base Free and Priority Fee: Post-EIP-1559

Back in August 2021, Ethereum implemented an upgrade known as EIP-1559, which changed its fee model, making it more predictable. To make this a simple EIP-1559 gas explanation — the model introduced two components, the Base Fee and the Priority Fee.

As the name suggests, the Base Fee is the mandatory fee, which is dynamically adjusted. This means that it changes for each block, and it depends on network congestion. In other words, when the network gets busy, the base fee is higher. It then removes a small amount of ETH from circulation permanently through the burning mechanism.

The other component is the Priority Fee, which is entirely optional. You can consider it a tip, and by paying it, you can get the validators to process your transaction faster. As always, the more you pay, the more likely it is to have your transaction processed sooner. However, even if you pay this fee, if it ends up being too low, you might still have to wait. Especially during busy periods, since Ethereum scalability is often unable to meet demand.

Example Calculation

To put this all into perspective for this blockchain gas fees guide, let’s see how it all works in an example, and how crypto network fees behave when you try to perform low-cost Ethereum transactions.

So, by trying to send ETH, you would have to keep the following gas limits and costs in mind:

  • Gas limit: 21,000 gwei for a basic ETH transfer
  • Base fee: 20 gwei
  • Priority fee, or tip: 5 gwei

The formula for calculating your total fee goes like this:

  • Total cost = Gas Limit x (Base Fee + Priority Fee)
  • Total cost = 21,000 x (20 + 5)
  • Total cost = 21,000 x 25
  • Total cost = 525,000 gwei (0.000525 ETH)

With the ETH price at the time of writing (February 17, 2025) sitting at $2,767, that would put your total cost at $1.45.

Of course, you do not have to calculate the total cost manually every time, as there are dedicated gwei price calculators, as well as crypto gas calculators for other networks, which use different models and fee structures.

Factors That Influence Gas Fees

Gas fees are not always the same, as mentioned earlier, and there are different factors that may impact them. Here is a short list of what affects gas prices:

Network Congestion

The biggest impact on crypto gas fees comes from network congestion. Congestion happens when the demand overwhelms the network’s scalability, meaning when the number of users trying to conduct transactions outperforms the network’s capabilities. The competition for block space skyrockets as everyone is trying to get their transaction processed at the same time.

This tends to happen when there is a major increase in DeFi activity, or when NFT drops and minting events are taking place, leading up to a major boost in user activity.

Complexity of Transactions

Another thing that affects gas prices are complex transactions. In our example earlier, we used a simple ETH transfer to show how to calculate gas fees, but not all transactions cost the same amount of gas. More complex transactions require more gas because they come with additional steps needed to process them, making them more valuable because they require more work and resources.

So, for example, simple transfers are around 21,000 gas at the cheapest. But, swaps on decentralized exchanges (DEXes) come at a much greater cost of anywhere between 100,000 and 300,000 gwei. We already mentioned that NFT minting is also much more expensive, between 200k and 600k gwei, while the most expensive actions come from deploying smart contracts.

This typically costs over 1 million gas, which represents extremely high Ethereum gas fees. They cost as much because they execute multiple operations within the network, like reading and writing data, performing verifications, potentially interacting with other contracts, and more.

ETH Price Fluctuations

Lastly, gas fees can also be impacted by ETH price fluctuations. Since gas fees are denominated in gwei, and gwei is a fraction of ETH, the increase in ETH price also increases the value of gwei, which ultimately increases the amount in USD or other fiat currencies that you have to pay to have your transaction processed.

Bullish periods are particularly notorious for this, as gas fees often spike due to more users coming to the crypto industry, attracted by surging prices. They buy more coins and tokens, interact with DeFi and dApps, buy more NFTs, and alike, all of which leads to a much busier network, causing not only an increase in how much gwei is worth but also a surge in gas fees due to congestion.

Real-World Examples of High Gas Fees

Ethereum has been around for 10 years now, so there have been several examples when gas in Ethereum ecosystem skyrocketed.

One of the most famous examples to this day happened in 2017, when the network had one of its earliest gas fee crises. At the time, Ethereum saw the launch of a blockchain-based game called CryptoKitties, where users could breed and trade digital cats. Each of the cats was an NFT, and the game exploded within days, leading to massive congestion.

Of course, gas fees skyrocketed as well, going from a few cents to anywhere between $10 and $100 per transaction. Analysts have estimated that around a quarter of Ethereum network’s traffic was CryptoKitties-related, which slowed down the network and delayed other transactions.

Another example came in 2021 and 2022 when the NFT sector exploded. The NFT minting frenzy led to a massive spike in gas fees, and in some cases, network-wide congestion. Users started engaging in gas wars, with everyone bidding to get their transaction processed faster, pumping the average fee value.

In extreme cases, some users even paid $5,000 in gas fees just to have their transaction processed before the others. In fact, it was not unusual to pay more for the transfer fee than the actual amount you were trying to send.

In both of these cases, as well as during other instances of major congestion, crypto users reacted in similar ways. Some postponed their transactions to avoid high fees, while many sought out alternative blockchains, where transaction speeds and scalability were higher, resulting in lower fees.

However, these incidents also led to the creation of scalability solutions for Ethereum. In some cases, Layer-2 networks were discussed, and the developers even started working on Ethereum 2.0, which shifted ETH from Proof-of-Work (PoW) to Proof-of-Stake (PoS).

Ethereum also saw the launch of scalability solutions such as Polygon, which has since grown to become a major player in the crypto arena, itself.

Strategies to Reduce Gas Fees

If you are looking for ways of avoiding high gas costs, there are several strategies to consider, such as:

Timing Transactions

Looking for the best time for transactions is one of the most reliable gas optimization strategies. Simply put, avoid peak hours when many users are active, and try to conduct your transfers during relatively calm periods. Stay away from the network when the prices are surging or crashing, or if a popular new trend has caused a lot of hype among crypto users.

Of course, this cannot always be the most viable solution, especially if you are trying to profit from price fluctuations. But, if you are looking to do something that is not time-sensitive, timing transactions to take place during less busy periods is a sound option.

Layer-2 Solutions

Another option is to turn to L2 solutions, such as Polygon, Arbitrum, and Optimism. Polygon is commonly used for NFTs, DeFi, and gaming activities, thanks to its near-zero gas fees.

Optimism is a solid roll-up solution that can reduce fees and speed up transactions. Then, there is Arbitrum, which is another rollup solution often used by DeFi users, thanks to its low fees. The way to use these networks is to bridge your funds from Ethereum’s mainnet to these L2 solutions via bridges and conduct your transactions there. Then, withdraw your money back only when you are done, but keep in mind that there are bridging fees that you will have to pay as well.

Batch Transactions

Lastly, another good option is to combine transactions into a single one, and conduct them in batches. That way, you can reduce total gas cost, although this is a solution that is the most useful for frequent users.

You can do it by using multisend tools, DEX aggregators, or special wallets with gas optimization capabilities, such as Gnosis Safe or MetaMask.

Ethereum 2.0 and the Future of Gas Fees

Finally, let’s discuss the future of gas Ethereum. Developers are constantly trying to think of new solutions and improve existing ones to reduce gas fees and make Ethereum cheaper to use.

One of these solutions is sharding - a technique that splits the ETH chain into multiple smaller chains, or shards, which can run parallel with one another and process transactions and smart contracts separately. That way, not every node would deal with every transaction, but would instead divide the workload.

If more transactions can be processed at the same time, then network congestion can be reduced, and gas fees would go down with it.

Other than that, developers are still working on fully implementing Ethereum 2.0, which is expected to reduce gas fees by boosting the network’s transaction throughput while lowering demand for block inclusion.

Then, there are rollups, which are already optimizing transaction costs within the ETH network right now. Rollups work by bundling multiple transactions into one, which reduces the load on the main chain.

Rollups are a big part of Ethereum’s roadmap, as they are the most commonly used way to help networks reach required scalability. Ethereum is currently still waiting for its sharding solution to be implemented, but even after it arrives (sometime in 2025, according to predictions), rollups will still be needed in the ETH network, as they will further optimize transaction fees.

Conclusion

This guide focused on explaining what gas crypto is, and its role in the ETH ecosystem. To understand it, you also needed to understand gwei, gas price changes within the blockchain network, and why gas is high in Ethereum in the first place.

We discussed the structure of gas fees, which contain two major elements - as priority fee and a base fee for Ethereum. By now, you should have a clear picture of why is Ethereum gas expensive, but also how to reduce gas fees for yourself.

In short, gas fees are there to serve as Ethereum validator incentives, and they tend to blow up during busy periods, whether because it is a busy time of day, or if a new trend has brought hype into the crypto space. But, by timing your transactions well, using L2 solutions, or other strategies, you can reduce the fees and pay less to have your transaction processed.

If you are interested in learning more about blockchain technology, such as understanding what is a smart contract, how ERC-20 wallet addresses work, or what is a DeFi wallet, you can learn all of this and more by reading other articles on our website.

FAQs

What happens if my transaction runs out of gas?

If a transaction runs out of gas before it is completed, it will fail. However, keep in mind that it will still cost gas, so make sure that you have enough to cover the full transaction, or you will waste any gas used for partial processing.

Can I set my own gas fee?

Yes, Ethereum allows you to adjust gas fees manually, meaning that you have full control of how much you are going to pay. Keep in mind that paying too low will lead to a failure, while the gas limit determines what is the maximum you can pay.

When are gas fees the lowest?

Gas fees tend to be the lowest during the weekends, and late at night based on the UTC time. This is due to the fact that US traders and investors play a massive role in the crypto industry, so when they are inactive, gas fees tend to drop considerably.

How can gas fees be reduced?

There are several methods to reduce gas fees, such as performing transactions during less busy period, batching transactions, using gas-optimized wallets, turning to L2 solutions, and waiting for the base fee to drop to its lowest point.

0

Comments

0