For anyone new to the Ethereum network; the terms Gas, Gas Limit, and Gas Price can be hard to understand. Therefore, to help you get your head around these and better understand how the Ethereum network works. We have created a quick guide that will teach you everything you need to know in less than 5 minutes.
Why Does Ethereum Need Gas, a Gas Limit, and a Gas Price?
The simple answer is that they make it possible to do a lot more with Ethereum than most other cryptocurrencies. For example, with Bitcoin, you can simply send money from one wallet to another. However, with Ethereum, the Gas Limit makes it possible to launch smart contracts and DApps, as well as store data on the blockchain. Don’t worry, you still have the possibility to send and receive money too.
What are Gas, Gas Limit, and Gas Price and how do they work?
Before we can explain what they are individually we must first understand a little bit more about how the Ethereum network works. Just like Bitcoin, Ethereum is also mined. However, miners don’t just confirm transactions, they also execute smart contracts, launch DApps, and store data on the blockchain. Just like with Bitcoin, miners are paid a small amount of Ether to do this.
Now, let’s find out what they do:
- Gas: is a unit that indicates the fee to be paid to a miner for completing a transaction or action. This fee is chosen by the sender. For example, if you want to send money from one wallet to another.
- Gas Limit: Is the maximum amount of Gas a person (say yourself) wishes to pay to complete your transaction. The minimum gas limit is 21,000
- Gas Price: This is the maximum amount of Gwei (a smaller unit of Ether, just like cents to a dollar) you are willing to spend to complete this transaction.
To extend this example out, therefore, if you set your limit to 25,000 and your gas price at 40 Gwei, this would mean you are willing to pay 0.001 Ether for a miner to complete the transaction. It is worth noting here that the more you pay, the quicker your transaction will be processed. For example, at present, if your gas is price 18 Gwei then your transaction will take around 30 minutes to be completed, but if your gas price is 25 Gwei this will only take 1-2 minutes. For this reason, it is worth considering how much you are sending and how important the payment or action is.
However, it is important to note that if you set the gas price and/or limit too low, it is possible that your transaction may be rejected because there is not enough Gas (the “Out of Gas” error) to complete the transaction. In this scenario, not only would your money not be sent, but the Gas money you invested will also be lost.
Websites such as Ether Gas Station will help you to choose the right gas price and limit for your transaction.