Solidity course

Solidity Level 10: Gas & EVM Efficiency

Gas & EVM Efficiency is level 10 of 17 of the LoWisa Solidity course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Gas Model

  • Gas mechanics. Every opcode costs gas: the transaction pays computation, memory and storage as it goes.
  • Storage dominates. SSTORE dominates cost: a storage write outweighs thousands of arithmetic ops.
  • Refunds and zeroing. Zeroing storage earns partial refunds: cleanup priced into the protocol.

Storage and Execution Costs

  • Packing and caching. Costs fall by packing slots and caching storage reads into memory locals.
  • Calldata over memory. External inputs stay in calldata: the cheapest data location for read-only arguments.
  • Batching. Batching amortises fixed overhead: one transaction settling many operations.

Optimising Without Sacrificing Safety

  • Measure gas. Gas work starts with reports: per-function costs measured in the test suite, tracked per commit.
  • Readability guard. An optimisation that obscures an invariant is a net loss: audits cost more than gas.
  • Optimiser settings. The compiler optimiser tunes for deploy versus runtime cost: a setting chosen, not defaulted.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Solidity Level 10: Gas & EVM Efficiency cover?

Gas Model, Storage and Execution Costs, Optimising Without Sacrificing Safety: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 9: Smart Contract Security, which covers Reentrancy and External Calls, Access and Economic Attacks, Secure Contract Patterns.

Learn Solidity on your phone

The first level is free. LoWisa is on Google Play and the App Store.