What is a gas fee in Ethereum?

Answer

Gas is the unit that measures the computational effort required to execute operations on the Ethereum network. Every transaction and smart contract call costs a certain amount of gas. Gas fee = gas units used × gas price (in gwei). After EIP-1559 (August 2021): fee = base fee (burned, set by network) + priority fee/tip (paid to validator). Gas incentivizes validators to include transactions and prevents spam by making denial-of-service attacks expensive. Key concepts: (1) Gas limit — maximum gas the user is willing to spend (set per transaction); unused gas is refunded; (2) Base fee — minimum fee required by the current block (adjusts up/down based on block fullness); (3) Priority fee — optional tip to validators for faster inclusion; (4) 1 ETH = 10^9 gwei; typical base fees range from 5–100+ gwei. Gas costs vary by operation: simple ETH transfer (~21,000 gas), ERC-20 transfer (~65,000 gas), complex DeFi interaction (~200,000–1,000,000+ gas). High gas fees were a major driver of Layer 2 adoption.