Ethereum Gas Explained

How are Gas Fees calculated?

The gas fee is calculated using Gas Limit * Gas Price per Unit. So if the gas limit was 20,000 and the price per unit was 200 gwei, the calculation would be 20,000 * 200 = 4,000,000 gwei or 0.004 ETH.

Source: Investopedia

Legacy vs EIP-1559

Legacy: A legacy transaction on Ethereum is the traditional method of executing transactions on the Ethereum blockchain, which involves setting a gas fee that validators must collect as payment for processing and verifying the transaction. Legacy transactions are processed in batches, and validators will prioritize transactions with higher fees over those with lower fees, resulting in longer transaction times and higher transaction fees.

eg. 100 GWEI

Eip-1559: An EIP-1559 (Ethereum Improvement Proposal) transaction is a new type of transaction on the Ethereum blockchain that eliminates the need for validators to collect a gas fee in order to process and verify the transaction. Instead, a base fee is set that is used to pay for the computational resources required to process the transaction.

Base Fee: Set by the network, the base fee indicates the minimum amount of gas that must be used for a transaction to be included in an Ethereum block. Base fees are burnt.

Priority Fee: Added to transactions to compensate validators for their risks, like mining uncle blocks. Paid directly to validators to have your transactions validated even faster.

Max Fee: Which is the absolute maximum you are willing to pay per unit of gas to get your transaction included in a block.

eg. Max Priority-Max Fee -> 20-80 GWEI

Source: Blocknative

Block Size

The actual maximum block size is 30M gas while the target is 15M.

Source: Ethereum Stackexchange

Last updated