Curriculum·G302 The EVM: Gas, Calls, and Reverts·about 34 min

The EVM executes, and it charges gas

By the end of this lesson you can

  • Explain that every EVM operation costs gas and that gas per block is capped
  • Describe how GovernMental's unbounded list grew until clearing it exceeded the block gas limit
  • Reason that a function whose cost can grow without bound will one day be uncallable
  • Recognize unbounded loops and storage as a design that can trap whatever a contract holds

Graduate · enrolled learners

This lesson opens with GovernMental, 2016.

What happened
GovernMental was a Ponzi-style game that recorded every participant in growing lists stored on-chain, and paying out a round required looping over and clearing those entire lists. Each step of that loop cost gas, and the total gas for the operation rose as the lists grew, until it exceeded the maximum gas that could fit in a single block. At that point the payout transaction could no longer be included in any block at all, because no block had room for it, so roughly 1,100 ether sat in a contract that could not run its own payout logic. The ether was eventually recovered much later, after the network's block gas limit had risen enough to fit the operation, but for a long time the funds were stuck, not by theft and not by a broken key, but by a design that let the cost of a function grow without bound. The contract asked the machine to do more work than a block could ever pay for, and the machine, which charges gas for every step and caps the gas per block, simply could not run it.
The decision point
The EVM charges gas for every operation it performs, and the gas that can fit in a single block is capped, so a function whose cost grows without bound will eventually cost more than a block allows and become impossible to execute, trapping whatever depends on it. GovernMental is the case: an unbounded list that had to be looped over and cleared grew until the operation exceeded the block gas limit, so the payout could not be included in any block and about 1,100 ether was stuck until the network's limit later rose. This is the foundational EVM lesson beneath all the others: on-chain computation is not free and is not unlimited, so a builder must think about cost the way they think about correctness, because a correct function that is too expensive to run is as useless as an incorrect one, and a function whose cost can grow, an unbounded loop, an unbounded array, a list that anyone can add to, can cross the block limit and lock the contract. So the discipline is to treat gas as a hard, finite resource: bound every loop and every storage structure a function must traverse, never let the cost of a critical operation depend on a quantity that can grow indefinitely, and design so that the essential functions of a contract can always be run within a block. GovernMental is what the gas model does to a design that ignores it: it does not reject the contract at deployment; it lets the cost creep upward until, one day, the contract can no longer do the one thing it exists to do.

What you will be able to answer

  • Why did ~1,100 ETH get stuck in GovernMental (2016)?
  • What does the EVM charge, and what is capped?
  • What happens to a function whose gas cost grows without bound?
  • How to keep essential functions always runnable

Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.

It is free. We do not sell the list and there is nothing to buy at the end of it.

Sources and review

Confidence high·Volatility low·Reviewed 2026-09-17·Owner unassigned

Contested

The loss is recorded as 0 because the roughly 1,100 ether was eventually recovered once the network's block gas limit had risen enough to fit the operation; the funds were trapped for a long time, which is the point, not permanently lost.

GovernMental was a Ponzi and its collapse involved other dynamics; this lesson uses only the gas-limit trap, an unbounded operation exceeding the block limit, which is the transferable engineering lesson.