A Guide to Ethereum Gas Fees and Ways to Reduce Them

A post about Ethereum gas fees, their calculation, and the role of transaction validators

Neptune Mutual
Neptune Mutual
6 min readJun 16, 2023

--

If you want to transact on the Ethereum base layer, you’ll have to pay gas fees to have your transaction processed. But what are gas fees, who do they go to, and why do they fluctuate so much? More importantly, what options do you have, as a trader or DeFi participant, to lower your transaction fees?

Understanding Gas Fees and Gas Units (Gwei)

Gas fees are the fees users pay to conduct a transaction, run smart contracts, or execute any operation on the Ethereum blockchain. Each block can hold a limited amount of data, so users bid to include their transactions or operations in the next block.

The gas fee payment is done in a unit called Gwei, which is a very small fraction of the currency ether (ETH). The reason for using Gwei is that it’s much easier for humans to read whole numbers than to count the number of zeros after a decimal point.

Gas fees are not flat fees but are determined by the level of activity on the network. This means that the number of pending transactions on the network is taken into account when calculating the total fee. Moreover, users can opt to pay extra to have their transaction “jump the queue”.

This brings us to the question of how gas fees are determined.

How Gas Fees Are Calculated

Let’s first understand the terms gas limits and gas price. The gas limit is the maximum cost allocated for a transaction. In other words, it’s the constraint that decides the maximum computational power a smart contract can consume.

On the other hand, the gas price is the price of the Gwei that depends upon the availability of the network at a certain moment. This means that the gas price is dynamic in itself. On top of that, users can pay an extra fee (a priority fee) to include their transaction in the next block. With that consideration, the gas price can be understood as the amount a user is willing to pay for each gas unit consumed by the transaction.

Now, gas fees are simply calculated by multiplying the gas limit by the gas price. That is

Gas Fees = Gas Limit * Gas Price

Let’s see an example:

For simplicity, let’s assume the gas limit of a transaction is 20,000 units and the base fee is 20 Gwei. Then, the gas fees would simply be

20,000 * 20 = 400,000 gwei = 0.0004 ETH

To encourage validators to process the transaction quickly, you decide to pay a priority fee of 5 Gwei. Then, the gas price would come up to 25 (20 + 5) Gwei.

The total fee can be calculated as follows:

In general, transferring ETH consumes 21,000 units of gas, regardless of the amount transferred. Whereas performing a more complex DeFi transaction or minting an NFT would consume a higher number of units of gas. This is because performing computation using the EVM (Ethereum Virtual Machine) and writing data to the blockchain are particularly expensive. Similarly, storing 1 kilobyte of data would cost 640,000 units of gas.

The Role of Validators and Rewards in Ethereum Transactions

Before the London Upgrade, Ethereum was a Proof of Work blockchain, and gas fees were calculated in a slightly different way. The fees for transactions went to miners for including a transaction in a block. The London Upgrade saw Ethereum switch to proof of stake. In this system, individuals or groups that wish to help secure the Ethereum network can do so by staking 32 ETH and running a validator node.

Validator nodes are rewarded for securing the network, but they don’t receive the full amount of the gas fee. Rather, in the example above, the base fee (20,000 * 20, or 400,000 Gwei) is burned. And the validator receives the 100,000 Gwei priority fee. Validator nodes are penalized if they provide erroneous data.

Layer 2 Solutions and Gas Fees

Compared to some other blockchains that have very small block size limits and a long period of time between blocks, Ethereum can support a reasonably high level of activity. However, spikes in blockchain activity can lead to an increase in the number of transactions waiting to be included in the next block. One notable example of this happening was the CryptoKitties boom of 2017, which pushed gas fees so high that some considered it to be a “scaling crisis”.

Since then, there have been many other apps and NFT crazes that have caused periods of network congestion. This has led to significant effort to build Layer 2 scaling solutions based on zero-knowledge proofs or rollups.

Advantages of Layer 2 Solutions for Reducing Gas Fees

Layer 2 solutions help reduce gas fees by taking transactions off the base layer. Rather than every transaction that occurs on the base layer, these solutions bundle up a high number of transactions that take place within Layer 2’s own ecosystem. These transactions are then settled all at once on Ethereum at a later date.

To prevent fraud, Layer 2 solutions rely on cryptographic proofs to show that the transactions they’re reporting are valid. The validator nodes look at this proof to decide whether to accept the transaction. There are a few different ways of batching transactions, including ZK Rollups and Optimistic Rollups. These approaches are slightly different, but their basic idea is that the base layer doesn’t need to know about every single transaction in a batch to validate it, as long as the proof supplied by Layer 2 is correct.

Gas Price Fluctuations and Tips for Saving on Transaction Fees

Gas fees can fluctuate significantly. You can see current gas fees on Etherscan and use these to estimate how much your transactions might cost. If you’re not in a rush to perform a transaction, pay attention to the gas prices over time and wait until prices drop to an acceptable level before you confirm the transaction.

Where possible, avoid transacting on the base layer. Many DeFi platforms offer options to use a Layer 2 solution such as Arbitrum, which offers faster and cheaper transactions while still giving you access to the types of tokens you’re interested in. We even have a variety of cover pools available on Arbitrum, so you can still take advantage of Neptune Mutual’s parametric cover services.

Layer 2s Are the Future of Ethereum.

For DeFi to be widely adopted, Ethereum must be able to accommodate an increased level of activity. The most sustainable and practical way to scale Ethereum is through Layer 2 solutions. These can accommodate much greater levels of throughput than Layer 1 while also lowering transaction fees.

Ethereum’s Shanghai Upgrade introduced some useful features to reduce gas fees for Arbitrum, Optimism, and other Layer 2s. Development work is still ongoing, both in terms of improving those Layer 2s themselves and the experience for non-technical users.

User-friendly wallets, fast transactions, lower transaction fees, and easier access to DeFi insurance will all help to improve Ethereum adoption and help us build a better Web3 for all.

About Us

Neptune Mutual project safeguards the Ethereum community from cyber threats. The protocol uses parametric cover as opposed to discretionary insurance. It has an easy and reliable on-chain claim process. This means that when incidents are confirmed by our community, resolution is fast.

Join us in our mission to cover, protect, and secure on-chain digital assets.

Official Website: https://neptunemutual.com
Blog:
https://neptunemutual.com/blog/
Twitter:
https://twitter.com/neptunemutual
Forums:
https://community.neptunemutual.com/
Telegram:
https://t.me/neptunemutual
Discord:
https://discord.gg/2qMGTtJtnW
YouTube:
https://www.youtube.com/c/NeptuneMutual
LinkedIn:
https://www.linkedin.com/company/neptune-mutual

--

--

Neptune Mutual
Neptune Mutual

Neptune Mutual provides you with guaranteed stablecoin liquidity to reduce risk exposure by hedging against capital risks and smart contract vulnerabilities.