Smart contracts & programmability

Ethereum Virtual Machine

The Ethereum Virtual Machine, or EVM, is the imaginary computer inside Ethereum that actually runs smart contracts. No single physical machine is 'the EVM'; instead, every node in the network simulates the very same computer and runs each contract through it step by step. Think of it as a sealed, standardized engine that thousands of operators each build to identical specifications, so that feeding the same instructions and inputs into any of them always produces the same result. The problem it solves is agreement: how can a worldwide network be sure they all computed the exact same outcome?

Smart contracts are written in human-friendly languages and then compiled down to a simple list of tiny instructions called bytecode that the EVM understands, much like how a recipe is broken into basic kitchen steps. The EVM works through these instructions one at a time, reading and updating the blockchain's stored data as it goes, and it is deliberately deterministic: given the same starting point it cannot wander off and give different answers on different machines. Each instruction also has a set cost, measured in gas, which the caller pays, and a contract that runs out of its gas budget is stopped and rolled back. This keeps any single program from running forever and freezing the network.

The EVM matters because it is the shared standard that makes contracts portable and predictable. Because so many people understood and adopted it, other blockchains built their own EVM-compatible engines, so a contract written once can often run on many networks with little change. That common foundation is a big reason the smart-contract ecosystem grew so quickly: developers learn one machine and one toolset, and their work travels widely.

When you send a transaction that calls a contract, your node and every other node load the contract's bytecode into the EVM and run it with the same inputs. Each one independently arrives at the identical new balances and data, then they record that shared result on the chain.

Many other blockchains run EVM-compatible engines, which is why the same contract code can often be deployed across several networks.

Also called
EVM以太坊虚拟机以太坊虛擬機