Ethereum is a global, decentralised network which helps people and organisations create value by coordinating without any central authorities. This coordination allows for the creation of Dapps which address everything from finance to media.
Yet, how does a distributed network run? How is Ethereum able to process transactions and execute smart contract code without a central entity? Via a virtual machine!
The idea of a virtual machine is nothing new; think logging into your work machine from home, before the rise of cloud computing. The Ethereum Virtual Machine, however, exists in many places at once. It is virtual, because the digital memory and processes that comprise it are scattered over many nodes. Each of these nodes is an individual computer or server, contributing resources such as staked ETH, electricity and computer hardware to keep the Ethereum network running. Additionally, the nodes reach consensus on changes to the state of the network with each passing block.
A Virtual Machine (detached from wherever the hardware of individual nodes might be), primarily consists of storage, and computation — much like a typical computer.
Each block contains information on every address and its current balance as the current state of the network. The network acts as a distributed ledger, reflecting network activity as new blocks are produced over time. With each new block, transactions and transfers change the state of the network, and balances are updated accordingly.
Transactions represent state changes, all of which must be computed by the EVM. While ETH transfers between accounts are relatively straightforward, other, more complex transactions, may need to pull a variety of information from different contracts and addresses in order to be processed. This computational power is measured in gas units, and must be paid for by the user, in ETH, when sending their transaction.
The inherent security of the EVM comes from its consensus mechanism, known as Proof-of-Stake. Transactions, and therefore their resulting state changes, are valid only when accepted into the blockchain by the consensus of validators, all of whom have a financial stake in the security of the network.
In order to maximise interoperability, some other blockchains and Layer 2s have been designed to be EVM-compatible, meaning that smart contracts and token standards can be migrated with minimal additional development work.
The EVM is a functional metaphor — one which allows anybody to talk to Ethereum’s globally spread computer, just like they would interact with a computer within their home or workplace. It is this ability to collectively run an open world-computer, which gives us all the political, social and economic advantages of the blockchain.