Sunday, October 11, 2026
Learn / Ethereum and smart contracts

What is the Ethereum Virtual Machine (EVM)?

The Ethereum Virtual Machine, or EVM, is the shared computer every Ethereum node runs to execute smart contracts and update the network's state the same way.

Ethereum and smart contracts Illustration: Cryptoweek

The Ethereum Virtual Machine (EVM) is the software environment that every Ethereum node runs to execute smart contracts and agree on the result. You can think of it as one shared computer spread across many independent machines. Each node runs the same code on the same inputs, so they all reach the same new state of the network.

How does the Ethereum Virtual Machine work?

ethereum.org describes Ethereum as a distributed state machine rather than just a ledger. The state includes every account, balance and piece of contract data. The EVM defines the rules for moving from one valid state to the next. In simple terms, it takes the old state plus a set of valid transactions and deterministically produces a new state. The whole state can be reduced to a single root hash stored in each block.

Under the hood, the EVM is a stack machine. Its stack can hold up to 1,024 items, and each item is a 256-bit word. That size was chosen to fit the 256-bit cryptography Ethereum uses. Contracts also have short term memory that is wiped after each transaction, and permanent storage that is part of the global state.

What are EVM opcodes and bytecode?

Developers usually write smart contracts in a language like Solidity, then compile them into bytecode. Bytecode is a list of opcodes, which are the EVM's basic instructions. Some are ordinary math and logic steps such as ADD or XOR. Others are specific to blockchains, such as reading an account's BALANCE or a recent BLOCKHASH.

Every opcode has a gas cost, which measures how much computing work it needs. This is why complex transactions cost more than simple transfers, and it also stops code from running forever. See what are gas fees for how those costs turn into the fee you pay.

All EVM versions must follow the rules in the Ethereum Yellow Paper. Each Ethereum execution client includes one, and standalone versions exist in Python, C++, JavaScript and Rust.

What does EVM compatible mean?

A chain is EVM compatible when it can run contracts written for Ethereum, usually with the same languages and developer tools. This has made the EVM a common standard well beyond Ethereum itself.

Many layer 2 networks build on it. Optimism's docs say OP Stack chains are EVM equivalent, so Ethereum contracts and tooling work without changes apart from documented exceptions. Arbitrum's docs say Arbitrum chains are EVM compatible, and its Nitro software is built on a fork of an Ethereum client. ZKsync Era runs its own EraVM, which is EVM compatible, so most Solidity contracts can deploy with little or no change.

What are EVM chains?

EVM chains are blockchains that use the EVM or a compatible version of it. Using one is not proof that a chain is as secure or decentralized as Ethereum. Each network has its own validators, upgrade process and risks, so it is worth understanding how a given chain works before using it.

This guide explains how things work. It is not financial, legal or tax advice. Last updated .