Gas Price in Ethereum

Published by Mario Oettler on

In the previous topic, we learned that gas is used to pay for the OP codes. In this topic, we learn how transaction senders obtain gas.

Cas is bought with ETH. Hence, gas has a price in ETH. This price depends on the supply and demand of block space. It is regulated in EIP 1559.

The gas price consists of two parts:

  1. Base fee: The base fee is burned. It is the minimum price a transaction creator has to pay to get its transaction in a block. If the total amount of gas in a block is greater than the target, the base fee increases. If the total amount of gas in a block is lower than the target, the gas fee decreases. This means the block size (in terms of gas) should always be somewhere around the target.
  2. Priority fee (or tip): The priority fee goes to the block producer. It serves as an incentive for the lock producer to include the transaction in a block.

This gas concept also has the effect that the amount of ETH can decrease as the base fee is burned (destroyed).

Categories: