In the Ethereum network, unlike Bitcoin and many other cryptocurrencies, not only the main cryptocurrency, but also Gas functions. It is Gas that allows users not only to make transactions, but also to launch smart contracts, deploy DApps, and store information on the blockchain. In this article, we will take a closer look at what Ethereum gas is, what it is used for, and how to optimize its costs.
What is Gas in Ethereum?
We are all used to the fact that in order to make transactions on the blockchain, you need to pay a commission to miners for their services in verifying transactions and supporting the network. And the Ethereum network is no exception! However, in Bitcoin and many other cryptocurrency networks, the fees process is quite simple. The user only needs to choose the optimal commission amount and wait for the transaction to be completed.
If you pay more, the transaction will be faster; if you pay less, you will have to wait a bit. Everything is more complicated with Ethereum. The commission for operations on the Ethereum network is calculated in gas, and is paid in ETH. That is, the more energy-intensive a transaction is, the more gas it will require to complete it, and the higher the commission will be.
Why does Ethereum need gas?
The Ethereum network combines more functions than a regular cryptocurrency. ETH can be used to send cryptocurrency transfers between users, but the main purpose of Ethereum is to create and maintain smart contracts. The concept of using gas allows Ethereum to separate the computational costs of EVM and the real value of ETH.
The second reason is to stimulate miners! There are many dApps deployed on Ethereum smart contracts that combine a wide variety of areas: games, insurance, finance, real estate and much more. Naturally, such a network requires special protection, and in the case of blockchain networks, the security of the network is directly proportional to its hashrate, that is, the number of miners.
To stimulate miners and offer them attractive earning conditions, a gas system was introduced. With its help, miners can receive a commission commensurate with their resource costs, because the more complex the transaction, the more gas it will require to complete it.
When is Ethereum Gas used?
Ethereum Gas appears when any operation is performed that requires payment of a commission. In particular, gas is needed to:
transfer ETH to another wallet;
create a smart contract on the Ethereum blockchain;
execute smart contracts.
Each of these operations requires its own amount of gas to perform. For example, a cryptocurrency transfer will require 21,000 gas. The cost of creating and executing a smart contract depends on its complexity and how many EVM instructions need to be executed.
How much does Gas Cost?
There is no fixed gas price. For each transaction, the sender independently sets two key parameters:
Gas Limit- the maximum gas limit that can be charged for the operation.
Gas Price- gas price chosen by the transaction initiator.
Gas Limit is primarily a feature for developers. It allows you to warn users against huge expenses as a result of an error, a huge or an endless contract cycle. So, if the operation requires only 21 thousand gas, and the user has set a limit of 50 thousand, the unspent difference will return to his wallet. At the same time, if a lower limit was set than required, the gas will be wasted and the operation itself will be rejected.
Using the Gas Price parameter, users of the cryptocurrency network can control the speed of their transactions. After all, the principle of price priority also applies to the Ethereum network: transactions with the highest value are included in the block first. The cost of gas is measured in the minimum part of the Ethereum – wei. However, most wallets show this parameter in Gwei.
1 Gwei is equal to 1 million wei. So, for example, if the Gas Limit is set to 50,000 and the sender indicated the price for one unit of gas at 20 Gwei, then the transaction will cost him 0.001 ETH. The average cost of Ethereum gas is typically 50-60 Gwei. But this parameter may vary depending on the network load. For example, the surge in interest in De-Fi in 2020 caused gas prices to jump from 11.7 Gwei to 538 Gwei.
How to Reduce the Price of Gas?
The cost of gas can be changed in accordance with the desired transaction processing speed. For example, for instant verification, the service now offers to set the gas price to 75 Gwei, for a transaction within two minutes, 72 Gwei, and for a standard transaction in five minutes, 64 Gwei. But these are only recommended parameters, calculated based on data for the last 10,000 blocks.
Setting a lower gas cost will allow the transaction initiator to save money. This is relevant if the timing of the transaction is not of great importance and you can wait. If you open the service calculator and calculate the transaction speed with a minimum gas cost of 0.1 Gwei, you will notice that it will be verified after about 3 thousand blocks.
And if we take into account that the extraction time of one block of transactions in the Ethereum network is only 15 seconds, then even with a minimum commission, the transaction will be completed in less than 12 hours. But there are a number of cases when it is better not to underestimate the cost of gas. For example, when participating in an ICO, it is recommended to set exactly the gas value that the organizers indicated.
Is it Possible to Bypass the Gas Fees?
Yes, you can only pay a notional fee of 1 wei for Ethereum transactions. The thing is that the block size in the Ethereum network is not measured in bytes, as, for example, in Bitcoin, but in the maximum amount of Gas that is required to process it. Also, often you will find that blocks are not completely filled. For example, if we look at a selection of recent blocks, we may notice that some of them are less than a third full and use 8-30% of the gas limit.
This indicates that the queue of transactions is small. Therefore, even if you set the minimum gas cost to 1 wei, the transaction will still go through. However, it is impossible to calculate the approximate time for its verification, since it will depend on other operations in the network.
But sending a transaction with a minimum commission is not so easy. It’s a fact that many wallets only allow you to adjust the price of gas within a specific range. For example, in the official Ethereum wallet and MyEtherWallet, the minimum gas cost is limited to 1 Gwei.

