What is Gas?
Every time a user transacts on the Ethereum network, they pay a fee, which is referred to as gas. Gas fees are expressed in “gwei,” a denomination of ether (ETH) equal to 0.000000001 ETH. The amount of gwei a user pays to have a transaction confirmed isn’t constant: it changes, sometimes dramatically, throughout a given day.
This article answers some commonly asked questions related to Ethereum gas fees to demystify one of the most fundamental components of an Ethereum transaction.
Why Do We Pay Gas Fees on Ethereum?
At a macro level, gas is what powers the Ethereum network and helps to ensure it runs smoothly and securely. How does it do this, you might ask?
Blockchains like Ethereum are a public record of transactions that are continually being checked (verified) for mathematical and cryptographic accuracy by an international network of computers. At the same time, new transactions are constantly being added to the blockchain in new groups (blocks). Individuals with access to sufficient computing power to help confirm and verify transactions on the blockchain need to be incentivized to provide this computing power to support the network. On Ethereum, these incentives are called gas fees, and those who provide the computing power are called miners.
Thus, gas is a unit of measurement that calculates the computational effort required by each transaction on the Ethereum network. More complex transactions require more computing power, thus more gas, to be confirmed.
Where Does the Gas Go?
Until very recently, all gas fees used to be paid to the miners in exchange for the computing power they provide to verify Ethereum’s public record of transactions and to confirm new transactions as they are added to the blockchain.
In August 2021, Ethereum launched EIP-1559, which changed the structure of an Ethereum transaction, and how the gas fees are distributed. Under EIP-1559, a portion of a transaction’s gas fees goes to the miner, while another portion is “burned,” or removed from circulation. For more on what EIP-1559 means for Ethereum, check out our article on the topic.
How are Gas Fees Determined?
Gas fees are determined by supply (room to have a transaction included & confirmed in a given block) and demand (the amount of people trying to submit a transaction at a given moment). It will be more expensive to transact on Ethereum if there is a high degree of traffic on the network.
Under EIP-1559, which has been in effect since August 2021, 3 pieces of information related to gas fees are required to complete a transaction: a Base Fee, a Priority Fee, and a Max Fee.
The Base Fee is set by the protocol, and reflects the amount of gas needed for the transaction to be included in a block. The Priority Fee, also known as the “tip,” is set by the user. It is the amount a user is willing to tip the miner for processing the transaction. The Max Fee is the highest amount the user is willing to pay for the transaction. The user sets this amount, which ensures they won’t pay more than they are comfortable with if the cost of gas surges as they submit their transaction.
Why is Gas so Expensive?
The question that seems to be on a lot of people’s minds is why it is becoming so expensive to transact on Ethereum. It is not uncommon that the Base Fee for an Ethereum transaction cost well over 100 or 200 gwei. The shortest answer is that high gas fees simply reflect more widespread adoption of cryptocurrencies and web3 decentralized applications (dApps).
While increased use of web3 networks is a great trend because it means more innovations in the space, and a chance for the values of web3 to spread, it also presents some problems. For one, it can be shocking and off putting when newcomers realize that they will sometimes need to spend over $100 USD just to complete a basic transaction.
The good news is many people in web3 are working on solutions to mitigate this issue. An important first step is the upcoming Merge, which shifts Ethereum from Proof of Work (PoW) to Proof of Stake (PoS) and lays the groundwork for future scaling technology. Data sharding in conjunction with the adoption of roll-ups and more robust L2 networks will continue to reduce the price of web3 transactions.