← All Ethereum Developer Flashcard Decks

Ethereum Virtual Machine (EVM) and Gas Optimization Flashcards

7 cards from real Ethereum Developer practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Ethereum Virtual Machine (EVM) and Gas Optimization flashcards as text
  1. What is 'gas' in the context of the Ethereum network?

    Answer: A unit measuring the computational work required to execute operations

    Gas is a unit that measures the computational effort required to execute specific operations, preventing infinite loops and metering resource usage.

  2. What is the approximate gas cost of writing to a new (zero-to-nonzero) storage slot using SSTORE?

    Answer: 20,000 gas

    Writing to a new storage slot (cold zero-to-nonzero SSTORE) costs approximately 20,000 gas, making persistent storage the most expensive EVM resource.

  3. After EIP-1559, what happens to the base fee portion of a transaction fee?

    Answer: It is burned and permanently removed from circulation

    EIP-1559 introduced a base fee that is burned with every transaction, creating a deflationary pressure on ETH supply.

  4. In Ethereum's EIP-1559 fee model, what is the 'priority fee' (tip)?

    Answer: An optional fee paid directly to validators to incentivize faster inclusion

    The priority fee (maxPriorityFeePerGas) is an optional tip paid directly to the block proposer to incentivize including a transaction in the current block.

  5. What triggers a gas refund in Ethereum smart contracts?

    Answer: When a storage slot is cleared by writing zero to a non-zero value

    Clearing a storage slot (writing zero to a previously non-zero slot) provides a partial gas refund, incentivizing state cleanup and reducing blockchain bloat.

  6. What happens when a transaction runs 'out of gas' in Ethereum?

    Answer: All state changes revert and the consumed gas is not refunded

    When gas is exhausted, the EVM reverts all state changes from that transaction, but the gas already consumed is kept by the validator as compensation.

  7. How much gas does a standard ETH transfer (no data, no contract) cost?

    Answer: 21,000 gas

    A standard ETH transfer costs exactly 21,000 gas, which is the fixed base transaction cost on Ethereum for a simple value transfer.