On the Ethereum blockchain, gas fees refer to the cost necessary to perform a transaction on the network. The price of gas is set by miners who can decline to process a transaction if it fails to meet their price threshold. Gas prices are denoted in gwei, which are worth 0.000000001 ether.
There are 2 main components to ‘gas’:
- Gas Limit: The maximum amount of Gas that a user is willing to pay for performing an action or confirming a transaction (minimum of 21,000). A simple ETH transfer would cost you 21,000 GAS, while more complex transactions could consume a few hundred thousand and up to several million GAS.
- Gas Price: The amount of Gwei that someone is willing to spend on each unit of Gas. The more money you are willing to pay per 1 GAS, the more appealing your transaction looks to miners and the faster it's going to be executed.
Transaction Fee = Gas * Gas Price
Why do I see different gas quotes from different Dapps?
Let's say you specify 20 GWEI as GAS PRICE. This means that you are willing to pay 0.000000002 Ether for each unit of GAS spent by your transaction:
- A simple ETH transfer will cost you 21,000 GAS * 0.000000002 Ether = 0.000042 ETH (approximately $0.01 based on the current ETH price).
- A more complex, let's say a 1,000,000 GAS transaction, can cost you 1,000,000 GAS * 0.000000002 Ether = 0.002 ETH (~$0.48).
🔖 Learn more: