Ethereum Virtual Machine (EVM)EVM

The Ethereum Virtual Machine is the computing environment that runs smart contracts on Ethereum. Many other blockchains are “EVM-compatible”, so the same contracts and wallets work on them.

The EVM is the engine that runs Ethereum's smart contracts. Many other chains copy it, so knowing what 'EVM-compatible' means helps you understand wallets, fees and where your tokens can go.

Category
Cryptocurrency and Blockchain
Reading time
3 min
Also called
EVM, EVM-compatible, Ethereum VM
Updated

The EVM in plain words

Every node runs the EVM to carry out smart contracts, and gas measures how much computing work each step takes.1

Ethereum is a distributed state machine rather than just a ledger.1

Given an input, the EVM produces a deterministic output, so every node reaches the same result.1

How the EVM processes a transaction

  1. Compile the contract

    Code is compiled to bytecode that runs as EVM opcodes.1

  2. Send a transaction

    A wallet or app calls a node through an RPC interface.2

  3. Execute on a stack

    The EVM is a stack machine with a depth of 1024 items.1

  4. Meter gas

    Each operation uses gas measuring computational effort.1

  5. Reach the same result

    Execution is deterministic, so all nodes agree.1

  6. Reuse on other chains

    Contracts written for Ethereum also work on EVM-compatible sidechains.3

Worked examples

Example 1 — Gas fee

$6.75 fee

Hypothetically a swap uses 150,000 gas at 15 gwei, ETH at $3,000.

Example 1 — Gas fee — calculation
Gas in ETH150,000 × 15 ÷ 1,000,000,000 = 0.00225 ETH
In dollars0.00225 × $3,000 = $6.75

Gas measures the computational effort of the operations the EVM runs.1

Example 2 — Same contract, cheaper chain

$131 saved

Hypothetically the same swap on an EVM-compatible chain costs $0.20 instead of $6.75.

Example 2 — Same contract, cheaper chain — calculation
Saving per swap$6.75 − $0.20 = $6.55
Over 20 swaps20 × $6.55 = $131

Contracts written for Ethereum Mainnet also work on EVM-compatible sidechains.3

Example 3 — Failed transaction

−0.0016 ETH

Hypothetically a transaction runs out of gas after using 80,000 gas at 20 gwei.

Example 3 — Failed transaction — calculation
Gas spent80,000 × 20 = 1,600,000 gwei
In ETH0.0016 ETH lost

Gas measures the computational effort used, so set limits with a margin before sending.1

Ethereum vs EVM-compatible chain

AspectEthereum MainnetEVM-compatible chain
Runs same contractsYesYes
SecurityEthereum validatorsIts own consensus
FeesOften higherOften lower
Same address formatYesUsually yes

Why traders care about the EVM

Advantages and disadvantages

Advantages

  • Same tools work across many chains.
  • Deterministic, verifiable execution.
  • Large developer ecosystem.
  • Lower-fee EVM chains are available.

Disadvantages

  • Gas is lost even on failed transactions.
  • Same address on many chains confuses deposits.
  • EVM chains have different security.
  • Smart contract bugs replicate easily.

Going deeper

Read as far as you need. Each level builds on the one before it.

A shared computer

Beginner

Every node runs the EVM to execute contracts and meters work with gas.1

Bytecode and opcodes

Intermediate

Compiled contracts run as EVM opcodes such as ADD and SUB, each with a gas cost.1

Compatible is not identical

Advanced

EVM-compatible sidechains run the same contracts but have their own consensus and security, so the risk is not the same as Ethereum's.3

Common mistakes

  1. Wrong-chain deposits

    Sending on an EVM chain the exchange doesn't support.

  2. Assuming equal security

    Treating every EVM chain like Ethereum.

  3. Low gas limits

    Setting limits that cause failed transactions.

  4. Copycat tokens

    Assuming the same token name is the same contract on each chain.

Check your understanding

Test yourself before moving on. Each answer comes with an explanation.

Q1100,000 gas at 10 gwei costs how much ETH?
Q2Does EVM-compatible mean the same security as Ethereum?

Key points to remember

  1. The EVM runs Ethereum smart contracts.
  2. Gas measures computational work.
  3. Execution is deterministic.
  4. Many chains are EVM-compatible.
  5. Compatible chains have different security.

Frequently asked questions

What is an EVM-compatible chain?

A blockchain that runs Ethereum-style smart contracts.

Why do failed transactions cost gas?

Validators still did the computation.

Is my address the same on EVM chains?

Usually yes, but balances on each chain are separate.

Further learning

Sources

This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.

  1. ethereum.org. Ethereum Virtual Machine (EVM) (opens in a new tab) Checked .
  2. NIST. NISTIR 8301: Blockchain Networks: Token Design and Management Overview (opens in a new tab) Checked .
  3. ethereum.org. Sidechains (opens in a new tab) Checked .

Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. We are not affiliated with any publisher linked above. Last reviewed . Report an error or request a source credit.