Let's imagine the bus stop with crowds of people. The bus stop is Mempool where people are waiting. The bus is blockchain. The size of the bus is Block Gas Limit. The miner is a driver. The bus ticket is Gas fee. The people are transactions.
Priority to get on board is based on bidding. People who want to get on board first, must pay a largest amount of money to the driver for the bus ticket.
Ethereum transactions require fees to be proceeded. In the Ethereum world, the fees are called "Gas" as well. It will be charged by Miners in order to process transactions.
Txstreet.com made a good visualizer for the blockchain system.
The amount of Gas required for each transactions depends on complexity of the transactions. The simple one might be 21,000 gas and the complex one might be 1,000,000 gas. Its value is calculated automatically by the blockchain system.
The Gas price is fluctuated all the times depending on the amount of traffic. When there are tons of demand at the same time, the price increases.
The Gas Price is denoted in Gwei unit. Wei is the smallest amount of ETH and Gwei is the gigabit of wei.
|Unit Name||Number of Wei|
The Transaction Cost can be calculated by this formula:
Gas Fee = Gas Required * Gas Price
Block Gas Limit
Ethereum Blockchain limits a single block size by Block Gas Limit which is set by Miners.
Because of this, if you want to put your transactions into the next block instantly, you have to bid higher. Otherwise, you have to sit and wait until the demand drops.
Once you understand every term of Gas. Let's put it in practice when you want to do any transaction
- Check gas price. If the price is high and you can wait, it is recommended to wait until Gas Price drops.
- Select the speed of the transaction. The faster speed requires more Gas fee.
- Try not to put Gas fee below the Standard speed. It may result in "Pending" transaction which means you can not do any transaction at the mean time. It may take about hours to finish the transaction. However, you can cancle or increase speed that will cost you more money.
- Do not put too low Gas fee. Your transaction might not be proceeded and you will lose your Gas fee for nothing.