- Want to know what are Gas fees in Ethereum ecosystem?
- How can you save on Gas fees and lower down your transaction cost?
Well, in this guide I will help you understand everything about Ethereum gas.
The other day I was preparing to participate in an ICO that required me to contribute in Ether (ETH).
The ICO was on Ethereum’s blockchain which meant that I needed to send my Ether (ETH) to an Ethereum smart contract address.
Soon after that, I figured out that MyEtherWallet (aka MEW) is one of the Best Smart Contracts Ethereum Wallets, so I started preparing my MEW for the ICO.
And as I have advised you to in my DApps write-up to read and understand the ICO requirements thoroughly, I did the same and went to the official ICO website to know what was required of me.
There I encountered that the ICO required a minimum recommended “Gas Limit” of 200000 and a “Gas Price” of 70 Gwei which should convert into fees of 0.014 Ether (ETH) or $3.15.
- Also see: How to buy Ethereum (ETH)
At that time, these terms of gas limit and gas price were alien to me.
Nevertheless, I did my due diligence and successfully participated in the ICO.
It was when I was doing my due diligence and researching these terms that I realized that they were all explained in a very technical way, and there was a lot of confusion around them. Moreover, it’s very important to understand these terms if you want to participate in DeFi or an Ethereum-based ICO.
Now that the ICO has concluded, I thought of introducing these terms to you in a more non-technical manner so that no one in the coinsutra.community is left behind.
But before that, I think a quick recap of Ethereum, Ether, and ICOs will be helpful.
What is Ether?
Ethereum is a blockchain-based platform on which anyone with knowledge of the Solidity language can write autonomous smart contracts and also create decentralized applications (aka DApps).
The official Ethereum project website says:
“Ethereum is a decentralized platform for applications that run exactly as programmed without any chance of fraud, censorship, or third-party interference.”
On the other hand, Ether (ETH) is the cryptocurrency which fuels these smart contracts, DApps, and transactions on the Ethereum blockchain.
Like Bitcoin, ETH is also a peer-to-peer currency, but it has a variety of applications, unlike BTC.
Ether (ETH), unlike BTC, can be programmed for many use-cases like for making DApps, enabling smart contracts, generating tokens during ICOs, and also for making standard P2P payments. That’s why Ethereum (or Ether) is also called programmable money.
Introduction to Ethereum Based ICOs
Typically an Ethereum based ICO looks like this:
- ICO website will declare its ICO timelines.
- Then they will declare their smart contract enabled address (ICO’s address).
- Participants need to send ETH to this address with a particular gas limit and gas price that is recommended by the ICO within the timelines.
Now, if your ETH transaction is mined and has enough gas limit as required by the ICO contract to get executed, then you will get your ICO tokens credited in your wallet.
Otherwise, if the gas limit is not enough, then the ICO’s smart contract execution will fail in between, and participants will not get their ICO tokens.
Introduction to Ether, Gas Limit, Gas Price, and Transaction Fees
To do anything on the Ethereum platform, you need to pay for it, and the payment (or fee) is calculated in Ether (ETH) via an intermediary benchmark called gas limit and gas price.
This equation is used for calculating ETH (or Transaction fees):
Ether = Tx Fees = Gas Limit * Gas Price
Let’s understand each component of this equation one by one:
What is Ether (aka Tx Fee)
On the Ethereum network, the final transaction fee is calculated in Ether. It is derived by the multiplication of the gas limit and the gas price.
For example, see this link of an Ether transaction on etherscan.io:
It shows the Tx fees (i.e. gas limit * gas price) in USD and ETH.
This fee is not claimed by wallets or other service providers; instead, it is paid to miners for mining blocks of transactions and for securing the Ethereum blockchain. This fee is paid by users to miners and is deducted from their whole transaction amount.
To understand the other two components of the equation (gas limit & gas price), take this example:
Let’s suppose you have a car which consumes 1-gallon of gasoline worth $10 per mile. Now, if you drive the car for 5 miles, it will cost you $50. This means that if you need to make your car work (or drive) for 5 miles, you will need to spend $50 by putting 5-gallons of gas into it.
Similarly, to run a line of code or do an operation on Ethereum, you need to burn the appropriate gas limit (like in a car), where each “gas limit” (like the car’s gasoline) will have a per unit price called “gas price”.
To clarify more:
- In a car, $10 (gas price) per gallon (gas limit).
- In Ethereum, 10 Gwei (gas price) per gas (gas limit).
Note: Gwei is the measuring unit of gas price (I will discuss this further in the article).
What is Gas Limit
Usually, when one is talking about “gas” in Ethereum, they are referring to “gas limit”. This simply means some amount of fuel is required to execute that operation or run that particular smart contract code.
Gas is a unit that gets translated further into Ether (ETH) as a cost of performing that action (or work). The requestor pays this cost to the miner who actually mines and validates that transaction (or action).
On Ethereum, the gas limit is measured in the unit of “gas”. For instance, if you want to execute 5 lines of code on Ethereum successfully, it will require 5 gas units. Think of it just like your car which consumes 5-gallons of gasoline for a 5-mile drive.
Gas limits are already defined on Ethereum depending upon how much code is needed to be executed on the blockchain for a particular operation.
If you play smart and say that you will feed in less amount of gas to run a particular code/operation, then it will fail and throw an error- “Out of Gas”. So in order to avoid this, you must feed in the right amount of recommended gas for the operation’s or smart contract’s code to get completed successfully.
Rule of thumb: If you want to pay less and are lowering the gas limit below the recommended gas limit, then this will not work. Instead, try lowering the gas price.
If you want to pay less for your transaction, you can do so by varying the other variable which also determines the final cost (or Tx fee) of the transaction. This variable is called “gas price“.
But mind you, lowering down the gas price will make the transaction take longer to be mined. This happens because all miners want to mine a transaction that has a higher mining reward (i.e. higher Tx fee).
On Ethereum, gas price is measured in a unit of Gwei. For 5 lines of code that need 5 units of gas, this would cost 5 Gwei.
Why not use ETH directly instead of gas price?
Actually, this is done to decouple the cost of any operation from the market price of Ether. As you know, cryptocurrency prices are very volatile, and ETH is no exception. That’s why on Ethereum’s blockchain, the gas limit for each operation is constant and fixed so that market volatility doesn’t impact Ethereum’s usage.
Just imagine a scenario in which instead of using this indirect way of fixed gas limits and variable gas prices, we had a fixed ETH cost. Let’s say the price of 1 ETH was $1000… No one would use the Ethereum platform because it would be too costly.
That’s why it becomes easy to bypass this volatility of the market and simultaneously lower the operations cost by using another variable.
How to Save on Ethereum Gas fees?
There are a few ways by which you can save on Gas fees:
The first thing you want to do is find the cheapest gas fees for a transaction to execute. To do this, head to Gasstation.info, and check the current gas fees.
As you can see from the above screen, the standard Gas fees is 173 and it could take less than 5 minutes to execute. I know that’s a lot of time, but depending upon your goal of transaction, you can use the standard fees or Trader fees.
Now, when you are using Metamask or any similar Ethereum wallets, you can set the gas fees. This is one thing not a lot of people are aware of, and they end up paying high gas fees.
Conclusion: Ether Gas
Generally, during normal times (when an ICO is not going on Ethereum), 21,000 gas limit is used for standard transactions. On the other hand, a 200,000 gas limit is used during an ICO.
For average gas prices, you can check on ethgasstation.
And these 3 types of gas prices are suggested during regular times for P2P transactions:
- Fast (40 Gwei)– Your transaction will likely get picked up in the very next block.
- Average (4 Gwei)– Your transaction will likely get picked up in next few blocks.
- Slow (0.6 Gwei)– Your transaction will likely get picked after several minutes.
But during an ICO, the average gas price shoots up to astronomical levels. You can keep an eye here for the latest recommended gas prices and gas limits. You can also calculate the average transaction fee and mean confirmation time for a given gas price and gas limit.
So that’s all from my side in this article, and I hope this helps you make the right choices for yourself.
Still, have questions about Ethereum gas prices and gas limits? Ask away in the comments below!
Like this post? Don’t forget to share it!
Here are a few hand-picked articles that you must read to increase your knowledge about Cryptocurrencies:
75 thoughts on “Ether Gas: Limit, Gas Price & Fees: How To Save On Gas Fees”
can gas only be sent in whole tokens as well or can you sent partial tokens to the ledger nano s?
I very much appreciate the “down to earth” explanations. The more I read, the more I realize that I have a lot to learn in the cryptocurrency world.
I have a clarifying question: If I contribute 1 ETH to an ICO with a 1 ETH minimum investment, is the Tx fee taken from the 1 ETH sent or is it taken from what is left in my MEW after the 1 ETH is removed?
My concern: If it is taken from the 1 ETH sent then I will not be contributing the minimum after the Tx deduction (by a small fraction).
@Randy, Thanks, yeah learning is best.
It will be deducted from MEW
Great article, it helped a newcomer wrap his head around a number of things.
I wanted to understand why some operations require more gas (limit) than others;
I wanted to enter an ICO but it required a $1.98 USD fee.
In comparison, sending $1USD in ETH would cost me $.036 USD from coinomi to MetaMask.
What happens during ICOs or their wallets that jump the fee from $0.36USD to $1.98USD.
could you help explain the gas (limit) difference?
Gas is used to execute smart contracts and smart contracts are basically lines of code with various call function etc..
More the code and functions, the more the Gas is consumed…
A transaction is the most basic form of operation on ETH, so usually, the cost is low.
I have another specific question. I sent some ETH from an exchange to my MEW and I saw through Etherscan that the transaction had a gas cost associated with it.
The amount of ETH sent was exactly the same amount that was received in my MEW? Who paid for the gas fee? This particular exchange does not charge a withdrawal fee.
If they don’t charge withdrawals fee, then the exchange paid it obviously. Which exchange by the way? tx id?
can you recommend any ICO currently going on
Not looking into ICOs now, so can’t say.
if a company did a successful ICO on the Ethereum platform and the tokens now get traded against the company’s services and goods, do I still need (Ethereum) Gas to process the transactions with the company’s new tokens? Is there a fixed connection between Ethereum gas and the transaction price of token transactions in a company’s token system?
Prices are not fixed, they are open to everyone like in a free market. Also, anything thing you do on Ethereum blockchain will cost your gas and its relevant price. Hope this answers 🙂
Hi, If any company wants to distribute tokens as community without any identity ICO and are on startup stage, what will be the total investment amount is required from the company excluding blockchain developer cost or any development on ethereum.
i HAVE A QUESTION
If I launch an ICO and customers buy. Will transferring the tokens to customers cost money. If so, how much an who pays the transfer fees
Of course and you pay it that.
Is the cost substantial? and approximately at what percentage?
How does having the concept of gas price solve the market price volatility problem? I mean the gas price is still in Ethereum, and hence would be affected by the price volatility.