The Ethereum Virtual Machine is the compute layer that runs smart contracts on Ethereum. It behaves like a global computer made up of thousands of nodes that all execute the same instructions and agree on the results. Developers deploy contract code to this environment, and every node can reproduce the outcome from the same inputs. This shared execution model lets apps run without a central server.
Ethereum keeps track of a changing “state” that includes account balances, contract storage, and other data. The EVM updates this state from block to block by applying precise rules. Each node runs the same rules, which helps the network stay in sync about what the latest valid state is.
Most contracts are written in high-level languages like Solidity, then compiled to bytecode that the EVM understands. When a transaction calls a contract, the EVM interprets that bytecode and performs the defined operations, such as reading or writing storage, making calls to other contracts, or emitting logs. The exact same bytecode and inputs produce the same outputs on every node.
Every EVM operation has a gas cost. The caller supplies a gas limit and fee, which pays the validators for the computation and also prevents wasteful or infinite execution. If a call runs out of gas, the EVM halts the computation and reverts state changes from that call.
Contracts run in a sandbox. Code cannot read arbitrary data on a validator’s machine and cannot escape into the host system. Isolation reduces the blast radius of buggy or malicious contracts and helps nodes verify transactions reliably.
The EVM design is reused by many other chains, so developers can deploy similar contracts and tools across networks without starting from scratch. Examples include Polygon, Arbitrum, and Avalanche, which aim to provide EVM-compatible environments while changing other parts of the stack, like consensus or throughput.
Solidity is the most common language for writing EVM contracts, and the EVM can support other languages that compile to EVM bytecode. This approach lets teams pick higher-level tooling while keeping a consistent runtime.
The EVM is the execution engine, not the peer-to-peer network or the consensus algorithm. Ethereum clients handle networking and consensus, then invoke the EVM to evaluate transactions and blocks according to the protocol rules. Keeping these roles separate makes it easier to upgrade one layer without rewriting everything.