The EVM is a tiny stack machine that executes bytecode, not Solidity.
Solidity is just a compiler convenience.
If you understand:
stack
memory
calldata
storage
opcodes
you can:
reverse engineer contracts
understand exploits
reason about gas
spot subtle bugs auditors miss
The EVM has four real working areas (ignore logs/code for now):
| Area | Lifetime | Read | Write | Cost |
|---|---|---|---|---|
| Stack | Per opcode | ✅ | ✅ | Cheap |
| Memory | Per transaction | ✅ | ✅ | Medium (expands) |
| Calldata | Per call | ✅ | ❌ | Very cheap |
| Storage | Persistent | ✅ | ✅ | Very expensive |
This distinction matters constantly in audits.
Key facts: