Skip to content
RED SAGSkills
easyBlockchain Developer interview question

How are transaction fees calculated on Ethereum today?

What the interviewer wants to hear

  • Fee = gas used times the price per gas
  • Base fee set by the protocol and burned; it rises and falls with demand
  • Priority fee (tip) goes to the validator
  • Users set max fee and max priority fee; unused amount is not charged
  • L2s charge a small execution fee plus a share of L1 data cost

Model answer

Every operation in the EVM costs a fixed amount of gas, and the fee is the gas used multiplied by the price per gas. Since EIP-1559, the price has two parts. The base fee is set by the protocol for each block, goes up when blocks are more than half full and down when they are emptier, and it is burned. The priority fee, or tip, goes to the validator and helps you get included faster. In a transaction you set a gas limit, a max fee per gas and a max priority fee; you pay base fee plus tip, never more than the max, and you only pay for gas actually used. On Layer 2s fees are much lower: you pay for L2 execution plus your share of the cost of posting data to Ethereum, which is cheap now that rollups use blobs.

Can you answer it under time pressure?

Take a timed easy round and get scored on every answer.

Start mock interview

More easy Blockchain Developer questions