advanced · 20 COMPLETE LESSONS

Inside the EVM

Begin with “Step inside the EVM” and work toward “Trace a small EVM program”. Each available lesson includes a visual explanation and a quick knowledge check.

Start this track →

Read in order or choose a topic below. Completion marks stay in this browser. All 20 lessons in this track are available.

  1. 01

    Step inside the EVM

    A stack machine that turns bytecode into checked state changes.

    8 MIN READ
  2. 02

    Bytecode versus source code

    The EVM executes bytes produced by a compiler, not Solidity text.

    4 MIN READ
  3. 03

    The program counter

    Instruction positions are byte offsets into the executing code.

    4 MIN READ
  4. 04

    The 256-bit stack

    EVM stack items are full-width words with limited depth.

    4 MIN READ
  5. 05

    PUSH, DUP and SWAP

    Introduce, copy and rearrange stack values.

    4 MIN READ
  6. 06

    ADD, MUL and modular arithmetic

    Raw word arithmetic wraps modulo two to the power of 256.

    4 MIN READ
  7. 07

    Signed arithmetic opcodes

    The same word bits can be interpreted as signed or unsigned.

    4 MIN READ
  8. 08

    Bitwise AND, OR and XOR

    These operations combine corresponding bits across words.

    4 MIN READ
  9. 09

    Shifts and byte extraction

    Shift direction and byte numbering must be stated explicitly.

    4 MIN READ
  10. 10

    MLOAD and MSTORE

    Word operations use byte-addressed temporary memory.

    4 MIN READ
  11. 11

    SLOAD and SSTORE

    Storage access uses slot keys in the current storage context.

    4 MIN READ
  12. 12

    Calldata load and copy

    Read message input as bytes before interpreting an ABI.

    4 MIN READ
  13. 13

    Return data and copying

    A child call leaves a result buffer separate from its success flag.

    4 MIN READ
  14. 14

    JUMP, JUMPI and JUMPDEST

    Control flow must target a valid destination instruction.

    4 MIN READ
  15. 15

    STOP, RETURN and REVERT

    Halting instructions differ in output and state outcome.

    4 MIN READ
  16. 16

    CALL opcode basics

    An external call creates a nested execution frame.

    4 MIN READ
  17. 17

    STATICCALL explained

    Read-only execution context prohibits state-changing operations.

    4 MIN READ
  18. 18

    DELEGATECALL and execution context

    Use another address’s code while retaining the caller’s state context.

    4 MIN READ
  19. 19

    LOG opcodes and topics

    Logs are explicit EVM effects with memory data and up to four topics.

    4 MIN READ
  20. 20

    Trace a small EVM program

    Track byte positions and stack changes before reasoning about state.

    4 MIN READ

← Choose another track · See the full curriculum