Telegram (AI) YouTube Facebook X
Ру

What is the Ethereum Virtual Machine (EVM)?

What is the Ethereum Virtual Machine (EVM)?
Advanced
What is the Ethereum Virtual Machine (EVM)?
Advanced

Key points

  • The Ethereum Virtual Machine (EVM) is a distributed computing environment that executes algorithms on the Ethereum network known as smart contracts.
  • The EVM is Turing-complete, meaning it can, in theory, process any computation that a general-purpose computer can, given sufficient resources.
  • To pay for executing smart contracts, the EVM uses “gas” (gwei), included in the transaction cost. The amount of gas a user must pay depends on computational complexity and current congestion on the Ethereum blockchain.

Creator of the EVM

The concept of the Ethereum Virtual Machine was set out in the “Yellow Paper” in 2015 by Gavin Wood, co-founder of Ethereum and then CTO of the Ethereum Foundation. He also created Solidity, the programming language used to build smart contracts on Ethereum. In 2016 Wood left Ethereum to develop a new project — Polkadot.

What the Ethereum Virtual Machine is for

Think of the EVM as a set of distributed computers that compute under the same rules within a single network, without a central authority.

Unlike the Bitcoin protocol, which is presented as a distributed ledger, Ethereum represents a large data structure whose processing and modification are handled by the EVM. Any code included in an Ethereum block runs on each of tens of thousands of virtual machines independently.

The EVM ensures that all transactions and smart contracts on Ethereum are executed according to established rules and the contract’s code. It is the platform that executes token operations on Ethereum, invoking smart contracts and altering account balances and application states.

The role of “gas” in the EVM

Gas (gwei) in Ethereum functions as an internal currency used to pay for operations performed on the EVM. One gwei equals 0.000000001 ETH. Gas in Ethereum is analogous to fuel: a user must “fill up” a transaction before it can move.

The gas limit for each transaction varies with the operation’s complexity and Ethereum’s network load. For example, in mid‑2021, amid frenzied demand for the meme coin Shiba Inu, the average Ethereum transaction fee reached $60, a Uniswap swap cost $135, and a Compound deposit exceeded $200. The main reason was heavy blockchain congestion — many users were simultaneously transacting with Shiba Inu.

If an operation proves too complex, the supplied gas limit may be insufficient, and the EVM will stop processing; the transaction will not be recorded on the Ethereum blockchain.

Without gas as payment for EVM work, computations could loop indefinitely and overload the network. Gas therefore acts as protection against abuse and attacks.

Where the EVM is used

Although many crypto projects use their own virtual machines, Ethereum is not the only platform that runs the EVM. Examples include:

  • Ethereum Classic. A platform for creating and executing smart contracts based on Proof‑of‑Work.
  • VeChain. A blockchain built on a Proof‑of‑Authority consensus mechanism.
  • Fantom. A smart‑contract platform that uses a directed acyclic graph (DAG) and is fully compatible with the EVM.
  • Polygon. A network of protocols and blockchains built on top of Ethereum.

EVM‑compatible blockchains

The Ethereum Virtual Machine has drawbacks, including high data‑storage costs, limited scalability, high gas prices during congestion, and notable constraints on smart‑contract programming.

EVM‑compatible networks address these issues by providing an execution environment similar to the EVM but with much cheaper transactions thanks to scaling solutions. This lets developers of decentralised applications in the Ethereum ecosystem migrate to more scalable blockchains without rewriting contracts from scratch.

One group of such solutions is sidechains. They may use separate blockchains with their own consensus algorithms and block parameters while retaining an EVM‑compatible virtual machine. Examples of Ethereum sidechains include Matic (Polygon PoS), Gnosis Chain and Loom Network.

Another option is Layer‑2 solutions (Layer 2), which rely on rollups. One example is Optimism, which uses the Optimistic Rollups protocol. Smart contracts on this blockchain are governed by the EVM, while the rollup protocol performs computation and stores contract state in a separate Optimistic Virtual Machine.

The evolution of the Ethereum Virtual Machine (EVM)

Over the next few years Ethereum is set for a series of major upgrades, the first of which will be The Merge — a transition to a new Proof‑of‑Stake consensus algorithm.

In July 2022 Vitalik Buterin presented a step‑by‑step roadmap for Ethereum. One key milestone is to replace the Ethereum Virtual Machine with a new one — Ethereum WebAssembly (eWASM).

Although final, detailed eWASM documentation is not yet available, developers highlight the following advantages:

  • Smart‑contract execution speeds close to native;
  • The ability to write contracts in many popular languages, including C, C++ and Rust;
  • Access to the vast WebAssembly developer community and tooling.

Follow ForkLog on social media

Telegram Instagram
Found a mistake in the text? Highlight it and press CTRL+ENTER.

Рассылки ForkLog: держите руку на пульсе биткоин-индустрии!

We use cookies to improve the quality of our service.

By using this website, you agree to the Privacy policy.

OK