What Is EVM? Ethereum Virtual Machine Explained

You've swapped tokens, minted an NFT, or switched MetaMask from Ethereum to Base without much thought. Then a project calls itself "EVM-compatible," or a thread mentions "zkEVMs," and nobody explains the term. Most answers to what is EVM jump from "it's a world computer" straight to opcode tables. This guide explains it in plain English instead.

Every time you click Confirm on a swap, computers all over the world run the same code, and they all have to reach exactly the same result. The engine behind this is the Ethereum Virtual Machine (EVM). It is the shared, sandboxed runtime that executes smart contract code on Ethereum. Every node runs it the same way, so every node ends up with an identical result.

Once you understand the EVM, several confusing things start to make sense. You'll see why failed transactions still cost gas, why one wallet address works on many chains, and why "EVM-compatible" does not mean "as safe as Ethereum." That knowledge can save you money. Throughout this guide, one running example comes up again and again: swapping USDC for ETH on a decentralized exchange (DEX) like Uniswap. You'll follow that single swap from your wallet, through the EVM, and onto a block explorer.

πŸ“‹ What You'll Learn

  • A plain-English definition of the EVM, and why Ethereum needs one
  • The core parts: world state, accounts, bytecode, the stack, memory, storage, calldata, and gas
  • What happens step by step when you confirm a transaction, including why reverts still cost gas
  • How gas fees work under EIP-1559 (base fee plus priority fee)
  • What "EVM-compatible" really means, and why compatibility is not the same as security
  • How rollups and zkEVMs bring the EVM to Layer 2, and how the EVM compares with other virtual machines
  • How to read a real transaction on Etherscan, plus security habits that prevent costly mistakes

⏱️ Estimated Time: 15–20 minutes to read, plus about 10 minutes for the optional Etherscan exercise

πŸ“Š Difficulty: Beginner–Intermediate (2/5). No coding required. Code snippets are optional, collapsible extras.

πŸ—ΊοΈ Your five-phase roadmap:

  1. Understand the concept: what the EVM is and why it exists
  2. Learn the parts: stack, memory, storage, and gas
  3. Follow a transaction: trace the running swap through the EVM
  4. Explore the ecosystem: L2s, EVM-compatible chains, and zkEVMs
  5. Apply it: read a block explorer and avoid common mistakes

Look for the "What it means for you" boxes at the end of technical sections. They translate each concept into practical impact. By the end, you'll be able to explain the EVM in two sentences, read a transaction on Etherscan, and spot misleading "EVM-compatible" marketing.

Before You Start

If you've used a crypto wallet even once, you're ready. To follow this guide, you'll need:

  • Basic blockchain knowledge: a general idea of what a blockchain is. A dedicated guide, What Is a Blockchain?, is coming soon.
  • Familiarity with Ethereum and ETH: you know Ethereum is a smart contract network and ETH is its native currency. What Is Ethereum? is coming soon.
  • Wallet experience: you've used a wallet such as MetaMask. What Is a Crypto Wallet? is coming soon.
  • A rough sense of smart contracts: programs that live on a blockchain. What Are Smart Contracts? is coming soon.
  • Optional tools for the hands-on exercise: a web browser and Etherscan. You don't need funds, a wallet connection, or an account.
  • The right mindset: you don't need to code. Treat every code block as an optional extra.

πŸ”€ Jargon Decoder

  • EVM: the Ethereum Virtual Machine, the software that runs smart contracts on Ethereum.
  • Node: a computer running Ethereum software that keeps a copy of the chain and checks every block.
  • Validator: a participant who has deposited 32 ETH and runs software to propose and vote on blocks, according to ethereum.org.
  • Bytecode: the compiled, machine-readable form of a smart contract.
  • Opcode: a single low-level instruction inside bytecode, such as ADD or SSTORE.
  • Gas: the unit that measures how much computational work a transaction needs.
  • Gwei: a small denomination of ETH (one-billionth of an ETH), used to price gas.
  • EOA: an Externally Owned Account, meaning a regular wallet address controlled by a private key.
  • Calldata: the read-only input data attached to a transaction.
  • Mempool: the waiting room where pending transactions sit before they are included in a block.
  • Revert: when a transaction fails partway and all of its changes are undone.
  • Rollup: a Layer 2 network that executes transactions off Ethereum's main chain and posts the results back to it.
  • Chain ID: a number that identifies a specific network, so a transaction signed for one chain can't be replayed on another.

With the vocabulary in place, start with the simplest version of the answer.

What Is EVM? The Short Answer

A one-paragraph definition

The Ethereum Virtual Machine (EVM) is the software environment that runs smart contract code on Ethereum. Every Ethereum node runs its own copy. Because the EVM is designed to be deterministic, every node that processes the same transactions reaches the same result. That shared agreement lets strangers trust code instead of trusting each other.

The official technical description is in the ethereum.org EVM documentation. The rest of this section explains the key words in that definition.

Why it's called a "virtual machine"

A virtual machine is software that behaves like a computer. It has its own instruction set, its own memory model, and its own rules. It runs on top of a physical machine but stays isolated from it.

Game emulators are a useful comparison. An emulator lets the same game run identically on a laptop, a phone, or a desktop. In the same way, the EVM lets the same contract run identically on every Ethereum node, whatever hardware or operating system that node uses.

A second analogy is the global vending machine. A smart contract works like a vending machine with fixed rules. Insert the right input (a transaction plus gas), and it produces the same output every time. The EVM is the internal mechanism, and every copy of the machine worldwide runs that mechanism the same way.

The "world computer" idea, and why that phrase misleads

Ethereum is often called a "world computer." The phrase is catchy but misleading. The EVM is not a fast supercomputer that pools everyone's processing power.

It is closer to one shared state copied across a global network of nodes. Every node repeats the same work to verify it. That makes the EVM deliberately slow and expensive compared with a normal server. The tradeoff is intentional: the network gives up raw speed in exchange for verifiability and resistance to censorship.

πŸ’‘ What it means for you: When your swap confirms, it isn't one company's server approving it. Many independent machines ran the same code, and they all agree on the result.

That raises a natural question: why does Ethereum need such a strict, isolated environment in the first place?

Why Ethereum Needs a Virtual Machine

Bitcoin Script vs. the EVM

Bitcoin also runs code, using a language called Bitcoin Script. Script is deliberately limited. It is designed mainly to define spending conditions, such as "this coin can be spent with a valid signature from this key," and it avoids loops.

The EVM takes a different approach. It is a general-purpose environment, so developers can build lending markets, DEXs, NFT collections, and DAOs on it. This is a difference in design priorities, not a ranking. Bitcoin favors simplicity and a smaller attack surface. Ethereum favors flexibility.

Determinism: why every node must get the same answer

Determinism means that the same starting state plus the same input always produces the same output. For the EVM, this is non-negotiable. If two honest nodes ran the same transaction and got different results, the network could not agree on who owns what.

The thousands of calculators metaphor captures the idea. Many people around the world solve the same math problem on identical calculators. If anyone's answer differs, it gets rejected. Determinism explains several EVM rules that otherwise look strange:

  • No private random-number generator. A contract can't ask for a random value that differs from node to node. Any randomness has to come from data that every node shares, such as block values or an external oracle.
  • No internet access. A contract can't fetch a webpage, because different nodes might see different content. External data, such as asset prices, arrives through oracles that write it on-chain.
  • Integer math only. EVM arithmetic uses integers rather than floating-point numbers, which avoids rounding differences between kinds of hardware.

Sandboxing: why contract code can't touch your computer's files

Contract code runs in an isolated environment. It can read and change only blockchain state. It cannot reach your computer's files, camera, or other apps.

The sandboxed game console is a good comparison. The console runs any cartridge you insert, but a cartridge can't reach into your house.

There is one important nuance. The sandbox protects your computer, not your tokens. If you approve a malicious contract to spend your tokens, the EVM will faithfully carry out that approval. The Security Best Practices section covers how to avoid this.

πŸ’‘ What it means for you: This is why a DEX needs a price oracle or on-chain pool data instead of looking up prices on a website. Every node has to compute exactly the same thing.

Now that the purpose is clear, the next step is to look inside the machine itself.

How the EVM Works: The Core Components

Ethereum as a state machine

Ethereum keeps a single "world state." It is a record of every account's balance, transaction count (nonce), contract code, and stored data. According to ethereum.org, this state is stored in a data structure called a modified Merkle Patricia Trie. That structure links all accounts by hashes and can be reduced to a single root hash stored on the blockchain.

Each transaction moves the world state from one valid version to the next. A flipbook is a helpful picture. Each block is a new page, drawn from the previous page plus the transactions in that block. The EVM is the set of rules for drawing the next page.

The formal specification is the Ethereum Yellow Paper by Gavin Wood. You don't need to read it. It's dense math, and this guide covers the practical meaning.

πŸ’‘ What it means for you: Your balance isn't stored inside your wallet app. It lives in Ethereum's world state, and your wallet simply reads it and signs transactions with your key.

Accounts: EOAs vs. contract accounts (and EIP-7702)

The EVM recognizes two kinds of accounts:

  • Externally Owned Accounts (EOAs): controlled by a private key. Your MetaMask address is an EOA. Only EOAs can start a transaction.
  • Contract accounts: controlled by their code. They have no private key and act only when something calls them.

Both kinds use the same address format, a hexadecimal string beginning with 0x. The line between them recently became less sharp. EIP-7702, introduced with Ethereum's Pectra upgrade, lets an EOA delegate to contract code. This enables features such as batching several actions into one transaction or letting someone else pay your gas.

There is a downside. A malicious delegation request can hand control of your account's behavior to an attacker's code. Treat any unexpected delegation prompt as a red flag.

Bytecode and opcodes

Developers usually write contracts in a high-level language. Solidity is the most common, and Vyper is a popular alternative. A compiler then turns that code into bytecode, a long hexadecimal string the EVM can read.

Bytecode is a sequence of opcodes, which are tiny instructions. Examples include ADD (add two numbers), SSTORE (write to permanent storage), CALL (call another contract), and REVERT (stop and undo everything).

Translator pipeline: Solidity code β†’ compiler β†’ bytecode β†’ opcodes β†’ EVM execution β†’ state change

To browse every opcode in a friendly format, use evm.codes. To learn the language itself, see the Solidity documentation.

Optional code peek: a tiny storage contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract SimpleStorage {
    uint256 public number;          // lives in permanent storage

    function set(uint256 newNumber) public {
        number = newNumber;         // compiles down to opcodes that
                                    // read calldata (CALLDATALOAD)
                                    // and write storage (SSTORE)
    }
}

You never need to read bytecode yourself. The key point is that one readable line of Solidity becomes several opcodes, and each opcode costs gas.

The stack

The EVM is a stack machine. Most opcodes take their inputs from the top of a stack and push their results back on top.

A stack of plates is the classic picture. You can only add a plate to the top or take one from the top. The EVM's stack also has a hard maximum depth, listed in the Yellow Paper and on evm.codes. That limit stops runaway programs from growing without bound.

Each item on the stack is a large, fixed-size word. It is sized to hold a full Keccak-256 hash, which is the hashing algorithm Ethereum uses. Wide words make cryptography and very large token amounts easy to handle. The cost is extra overhead for everyday small numbers.

Memory vs. storage vs. calldata

Contracts work with three kinds of data space. A whiteboard, a notebook, and a sealed envelope make the differences easy to remember:

  • Memory (the whiteboard): temporary scratch space, wiped after each call. It is cheap to use.
  • Storage (the notebook): permanent and part of the world state. Every full node has to keep it, which is why writing to it is one of the most expensive things a transaction can do.
  • Calldata (the sealed envelope): the read-only input sent with your transaction, such as which function to call and with what amounts. The contract can read it but not change it.

πŸ’‘ What it means for you: Storage writes are expensive, which is why minting an NFT or swapping tokens costs more than a plain ETH transfer. Those actions write new data into the shared notebook.

Gas: the meter that makes computation finite

Every opcode has a gas cost, and every transaction carries a gas limit. The EVM subtracts gas as it runs. If the gas runs out, execution stops.

Because of this, every computation on Ethereum is finite. An infinite loop can't freeze the network, because it simply runs out of gas. For this reason the EVM is often called "quasi-Turing-complete." In principle it can compute anything, but only within the gas budget that someone pays for.

πŸ’‘ What it means for you: Gas is the reason nobody can stall Ethereum with an endless loop. It is also the reason every action you take has a price tag.

Those are the parts. Next comes the payoff: watching them work together when you press Confirm.

Step-by-Step: What Happens When You Send a Transaction

Transaction journey: β‘  Wallet signs β†’ β‘‘ Mempool β†’ β‘’ Validator includes it β†’ β‘£ EVM executes β†’ β‘€ Commit or revert β†’ β‘₯ All nodes agree

Step 1: You sign a transaction in your wallet

Action: you click Confirm. Your wallet builds a transaction containing several fields:

  • to: the address you're interacting with (a person or a contract)
  • value: how much ETH you're sending, if any
  • data: the encoded function call, such as "swap these tokens"
  • nonce: your account's transaction counter
  • gas limit, max fee, and max priority fee: your spending caps
  • chain ID: which network the transaction is for

Your private key signs this bundle using the secp256k1 signature scheme. Including the chain ID (a replay protection introduced by EIP-155) ties the signature to one network, so it can't be replayed on another chain.

You've seen this when MetaMask shows its confirmation screen with a network name, an estimated fee, and sometimes a "Data" or "Hex" tab.

Step 2: The transaction is broadcast to the mempool

Action: your wallet sends the signed transaction to the network. It enters the mempool, a pool of pending transactions waiting to be picked up.

You've seen this when your transaction shows as "Pending." Using Speed Up or Cancel in your wallet sends a replacement transaction with the same nonce and a higher fee. Only one transaction can use a given nonce, so whichever is included first wins.

Step 3: A validator includes it in a block

Action: a block proposer picks transactions. Since Ethereum switched to proof-of-stake in 2022, blocks come from validators, not miners. According to ethereum.org, one validator is chosen pseudo-randomly (using RANDAO) to propose the block for each slot. Ethereum's block time is 12s.

Block builders usually order transactions with the priority fee (tip) in mind. Because the mempool is public, some bots try to front-run trades. That's one reason slippage settings matter.

Step 4: The EVM runs the contract bytecode, opcode by opcode

Action: execution begins. The EVM loads the target contract's bytecode and passes it your calldata. It then runs the code one opcode at a time and deducts gas for each instruction.

Contracts can call other contracts during execution. On a block explorer, those contract-to-contract calls appear as internal transactions.

Step 5: Commit on success, roll back on revert (gas still paid)

Action: the outcome is decided. If execution finishes successfully, the state changes are committed and the contract emits event logs, such as "Transfer."

If the code hits a REVERT, for example because the price moved beyond your slippage limit, all state changes roll back. No tokens move. However, you still pay for the gas used up to that point. If the transaction runs out of gas instead, the entire gas limit is consumed.

The taxi meter explains why. You set a maximum fare, which is your gas limit. If the ride stops early, you still pay for the distance already covered.

Hypothetical example: All figures are illustrative only. Suppose you set a gas limit of 200,000 and pay a total price of 10 gwei per unit of gas.

  • The swap reverts after using 60,000 gas: 60,000 Γ— 10 = 600,000 gwei, which is 0.0006 ETH. Your tokens stay put, but this fee is paid.
  • The swap runs out of gas: the whole limit is used, so 200,000 Γ— 10 = 2,000,000 gwei, which is 0.002 ETH.

Conversion: 1 gwei = 0.000000001 ETH, so 600,000 gwei = 0.0006 ETH and 2,000,000 gwei = 0.002 ETH.

Step 6: Every node re-executes and agrees

Action: the network verifies. Every full node runs the same transactions in the same order. Each one checks that it arrives at the same new state root, which is the single hash summarizing the entire world state. This is the thousands-of-calculators idea in practice. Any node that computes a different result rejects the block.

πŸ”€ Troubleshooting your transaction status:

  • If it says "Failed": open it in the block explorer and read the error. "Out of gas" means your limit was too low. "Execution reverted" with a reason, such as a slippage error, means the contract rejected the action.
  • If it stays "Pending" for a long time: your max fee is probably below the current base fee. Use Speed Up, or wait for fees to fall.
  • If it says "Success" but your tokens look missing: check that your wallet is on the correct network, then import the token using its contract address for that network.

Worked example: a token swap, followed through the EVM

Here is the running example from start to finish. The steps describe how a typical DEX router-and-pool design works. Exact contract structures vary by DEX and version.

Hypothetical example: Suppose you swap 100 USDC for ETH with a slippage tolerance of 0.5%. Both figures are illustrative.

  1. The approval transaction (first time only): you call approve() on the USDC contract. This gives the DEX router an allowance to move your USDC. It is a separate transaction with its own gas fee.
  2. The swap transaction: you call the router. The router pulls your USDC with transferFrom, then calls the pool contract. The pool updates its reserves, which are storage writes. It then sends out wrapped ETH (WETH), which the router often unwraps to ETH for you.
  3. Events and traces: the contracts emit Transfer events. The explorer shows "ERC-20 Tokens Transferred" and internal transactions for the contract-to-contract calls.
  4. The slippage check: the router computes a minimum output based on your 0.5% tolerance. If the price moves further than that before execution, the router reverts. No tokens move, but you pay for the gas used.

πŸ’‘ What it means for you: Slippage settings aren't only about price. Set them too tight on a volatile token and you'll pay gas for reverts. Set them too loose and you invite front-running.

Gas appeared in almost every step above. The next section explains exactly how it turns into the fee you pay.

Understanding Gas in the EVM

Gas units vs. gas price: why "gas" isn't the fee

Gas measures work, and the gas price is what you pay per unit of work. Gas prices are quoted in gwei, which is one-billionth of an ETH. The basic formula is:

Fee = gas used Γ— price per unit of gas

The ethereum.org gas page covers the official details. Real prices change every block, so the example below uses round illustrative figures.

Hypothetical example: All figures are illustrative only. Suppose a transaction uses 100,000 gas. The base fee is 20 gwei, you add a priority fee of 2 gwei, and you set a max fee of 30 gwei.

  • Price actually paid per gas: 20 + 2 = 22 gwei
  • Total fee: 100,000 Γ— 22 = 2,200,000 gwei = 0.0022 ETH
  • Base-fee portion (burned): 100,000 Γ— 20 = 2,000,000 gwei = 0.002 ETH
  • Tip to the validator: 100,000 Γ— 2 = 200,000 gwei = 0.0002 ETH
  • Maximum you authorized for that gas: 100,000 Γ— 30 = 3,000,000 gwei = 0.003 ETH
  • Unspent headroom kept in your wallet: 3,000,000 βˆ’ 2,200,000 = 800,000 gwei = 0.0008 ETH

EIP-1559 basics: base fee (burned) + priority fee (tip)

EIP-1559 split the fee into two parts:

  • Base fee: set by the protocol, not by you. It rises and falls with demand for block space. Under EIP-1559 it is designed to be burned, meaning it is removed from circulation rather than paid to anyone.
  • Priority fee (tip): the amount you choose to pay the validator to encourage them to include your transaction, as ethereum.org describes.

Your max fee is a ceiling, not a price you're guaranteed to pay. You pay the base fee plus your tip, and anything below your ceiling stays in your wallet.

Why fees spike: blocks have a target size and a hard maximum. When blocks keep filling above the target, the base fee rises by a bounded amount each block until demand cools off. Popular NFT mints and market crashes can push it up quickly.

The gas limit and why transactions "run out of gas"

The gas limit is the most gas you allow a transaction to use. Wallets estimate it for you by simulating the transaction.

If you set it too low, the EVM runs out of gas partway through. The transaction fails, and you pay for the whole limit. If you set it higher than needed, you pay only for the gas actually used. Unused gas is not charged.

Why some actions cost more than others

Different actions run different amounts of code. From cheapest to most expensive, the general pattern looks like this:

  1. Plain ETH transfer: no contract code runs. It is the cheapest common action.
  2. Token transfer (ERC-20): the token contract runs and updates two balances in storage.
  3. DEX swap or NFT mint: several contracts call each other, and multiple storage slots are written.

In the running swap, gas goes to the router call, the USDC transfer (updating balances in storage), the pool's reserve updates (more storage writes), the WETH handling, and the emitted events. Each of those adds opcodes and storage writes, which is why a swap costs more than a transfer. A dedicated guide, How to Reduce Ethereum Gas Fees, is coming soon.

πŸ’‘ What it means for you: To save money, transact when the base fee is low. Don't cut the gas limit below your wallet's estimate. Lower the price you're willing to pay instead.

So far the EVM has been treated as a single engine. In practice, it is one layer of a larger software stack.

The EVM's Place in Ethereum's Architecture

Execution layer vs. consensus layer after The Merge

Ethereum switched to proof-of-stake in 2022, an event known as The Merge. Since then, the network has run as two cooperating layers:

  • Execution layer: runs the EVM, processes transactions, and maintains world state.
  • Consensus layer: proof-of-stake validators agree on block order and finality. According to ethereum.org, finality comes from Casper the Friendly Finality Gadget (Casper-FFG).

The two layers communicate through an interface called the Engine API. According to ethereum.org, a validator must deposit 32 ETH and run three separate pieces of software: an execution client, a consensus client, and a validator client.

This corrects an outdated idea you'll still see online, namely that "miners run the EVM." That language comes from before The Merge. Today every full node runs an execution client, and validators propose and attest to blocks.

Execution clients that implement the EVM (and why client diversity matters)

Several independent teams build execution clients from the same specification. They include Geth, Nethermind, Besu, Erigon, and Reth. Each is a separate implementation of the EVM, often in a different programming language.

This diversity is a safety feature. If one client with a bug ran most of the network, that bug could cause a chain split or delay finality. With several independent implementations, a bug in one client affects a smaller share of nodes, and the others can keep the chain on track. A dedicated guide, Proof of Stake Explained, is coming soon.

πŸ’‘ What it means for you: The EVM isn't one program owned by one company. It's a specification that several independent teams implement, which is part of why Ethereum is hard to shut down.

Because the EVM is an open specification, other networks can implement it too. That is where "EVM-compatible" comes in.

What Does "EVM-Compatible" Mean?

An EVM-compatible blockchain can run smart contracts written for Ethereum and works with Ethereum tools such as MetaMask. It uses the same address format and similar transaction formats. Developers can often deploy the same Solidity code with few or no changes.

Compatible vs. equivalent: understanding the spectrum

"EVM-compatible" is a range rather than a yes-or-no label:

Looser ← EVM-compatible β€” EVM-equivalent β€” Ethereum-equivalent β†’ Stricter

  • EVM-compatible: runs most Solidity contracts but may differ in some opcodes, gas costs, or built-in helper contracts (precompiles). Some contracts may need adjustments.
  • EVM-equivalent: matches Ethereum's execution behavior closely enough that contracts and developer tools work without changes.
  • Ethereum-equivalent: also matches Ethereum's internal data structures and hashing. This is the strictest level.

Why the same wallet address works on many chains

Your address is derived from your private key using the same cryptography on every EVM chain: secp256k1 signatures and Keccak-256 hashing. Same key, same math, same address. That's why your MetaMask address is identical on Ethereum, Arbitrum, Base, Polygon, and BNB Chain.

Networks are told apart by their chain ID. To check one in MetaMask, open the network selector, choose the network's settings or Edit option, and look at the Chain ID field. Compare it with the value in the chain's official documentation before adding a custom network.

Critical nuance: same address does not mean same balance. Each chain keeps its own separate ledger. Tokens also have different contract addresses on different chains. For example, CoinGecko lists the VIRTUAL token (Virtuals Protocol) at 0x44ff8620b8ca30902395a7bd3f2407e1a091bf73 on Ethereum and at 0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b on Base. Always check the contract address for the network you're on.

Smart contract wallets and multisigs, such as a Safe, may not exist at the same address on another chain. Funds sent there by mistake can be unrecoverable.

Popular EVM-compatible networks

  • BNB Smart Chain: launched in 2020 and uses a Proof of Staked Authority (PoSA) validator system. Its documentation lists a block time of 0.45 seconds and describes the chain as designed to run the EVM.
  • Polygon PoS: a proof-of-stake chain with its own validator set, widely used for lower-cost transactions.
  • Avalanche C-Chain: the EVM-compatible contract chain within the Avalanche network, secured by Avalanche's own validators.
  • Smaller networks: Conflux, IoTeX, ZetaChain, and Ontology also document EVM compatibility in their official docs.

Compatibility does NOT mean the same security

The universal power outlet metaphor explains this. EVM-compatible chains share the same "plug," so wallets, tools, and contracts fit. A matching outlet says nothing about the power plant behind it.

The chains above illustrate the point. They run EVM-style contracts but are secured in very different ways. BNB Smart Chain uses Proof of Staked Authority. Conflux uses its own Ghast consensus algorithm. IoTeX uses Roll-DPoS. Ethereum itself uses proof-of-stake with Casper-FFG finality.

Security depends on several factors:

  • Who the validators are and how many independent parties control them
  • How assets are bridged in and out
  • Who holds admin or upgrade keys

πŸ’‘ What it means for you: Before you deposit, check which network your wallet is on and who secures that chain. A familiar MetaMask screen doesn't mean Ethereum-level protection.

Some EVM networks take a different route to scale. They build on top of Ethereum rather than beside it.

EVM on Layer 2: Rollups and zkEVMs

Rollups execute EVM transactions off Ethereum's main chain. They then post the transaction data and a commitment to the results back to Ethereum. Since EIP-4844 (the Dencun upgrade), most of that data is posted in cheaper "blobs." For example, L2BEAT lists Starknet's data availability as "Ethereum with blobs." Sharing that posting cost across many users is why Layer 2 fees are usually much lower. A dedicated guide, What Are Layer 2s?, is coming soon.

Optimistic rollups: Arbitrum, OP Mainnet, Base

Optimistic rollups such as Arbitrum, OP Mainnet, and Base run EVM-equivalent execution. Their results are assumed valid unless someone challenges them with a fraud proof during a challenge window.

Because of that window, withdrawing to Ethereum through the native bridge can take days. Third-party bridges offer faster exits, but they add their own trust assumptions.

zkEVMs: proving EVM execution with zero-knowledge proofs

A zkEVM runs EVM-style execution and also produces a validity proof, a cryptographic proof that the computation was done correctly. Ethereum verifies the proof, so no long challenge window is needed.

For example, L2BEAT lists zkSync Era's state validation as "Validity proofs." Other projects, including Scroll, Linea, Taiko, and Immutable zkEVM, have pursued zkEVM designs at different points on the compatibility spectrum. Not every ZK rollup runs the EVM, though. Starknet is a ZK rollup that settles on Ethereum, but it is generally described as using its own CairoVM rather than the EVM. A dedicated guide, What Are Zero-Knowledge Proofs?, is coming soon.

The four types of zkEVMs (Vitalik's classification)

Vitalik Buterin's post "The different types of ZK-EVMs" sorts zkEVMs by how closely they match Ethereum. The tradeoff runs between compatibility and how quickly proofs can be generated.

TypeWhat it matchesTradeoff
Type 1Fully Ethereum-equivalentMaximum compatibility, slowest proving
Type 2EVM-equivalent, with small internal changesNear-full compatibility, faster proving
Type 2.5EVM-equivalent except for some gas costsFaster proving; gas-sensitive contracts may behave differently
Type 3Almost EVM-equivalent, with some features droppedSome contracts need changes
Type 4Compiles Solidity or Vyper to a different, ZK-friendly VMLeast compatible, fastest proving

← More compatible β€”β€”β€”β€” Faster proving β†’

Projects often move between types as their technology matures, so check each project's current documentation rather than relying on older labels.

Layer 2s also differ in how decentralized they are. L2BEAT tracks rollup "stages," sequencer risks, and upgrade controls. For example, it currently lists Starknet as Stage 1.

πŸ’‘ What it means for you: Rollups let you use the same EVM apps at a fraction of mainnet cost. Before bridging serious money, check the rollup's stage and risks on L2BEAT.

The EVM isn't the only smart contract engine, either. Here is how it compares with the main alternatives.

Comparison: EVM vs. Other Virtual Machines

Comparison table: EVM vs. SVM vs. Move vs. WASM

VMMain chainsLanguagesExecution modelEcosystem and toolingKey tradeoff
EVM Ethereum, its L2s, BNB Smart Chain, Polygon PoS, Avalanche C-Chain Solidity, Vyper ➑️ Sequential (one transaction after another) 🌳 Largest smart contract ecosystem; mature tools such as Hardhat, Foundry, and Remix Proven and portable, but harder to parallelize and carries legacy design choices
SVM (Solana's Sealevel) Solana, plus some SVM-based projects Mainly Rust πŸ”€ Parallel; transactions declare the accounts they touch up front 🌿 Large and growing High throughput, but heavier validator hardware demands and a different account model
Move-based VMs Aptos, Sui (see Sui docs) Move πŸ”€ Parallel, with chain-specific designs 🌱 Smaller but active A resource-oriented language that helps prevent assets from being copied or lost by accident; smaller ecosystem
WASM-based VMs CosmWasm chains, NEAR, and Arbitrum Stylus (alongside the EVM) Rust, C, and other mainstream languages Varies by chain 🌱 Spread across many chains Familiar programming languages, but tooling and liquidity are fragmented

How to read the tradeoffs

No VM is "best" in general. The EVM's advantage is its ecosystem: developers, audited code, liquidity, and tooling. Newer VMs aim for parallel execution or safer language designs, but they start with smaller ecosystems.

Other chains follow their own models too. Cardano is generally described as using an eUTxO model, and Algorand has its own Algorand Virtual Machine. Some projects bridge these worlds, for example by offering EVM environments on non-EVM chains or building SVM-based rollups. Each bridge between worlds adds its own trust assumptions.

πŸ’‘ What it means for you: Your MetaMask address won't work natively on Solana or Sui. Each VM family needs its own wallet and address format.

Strengths and Limitations of the EVM

Strengths: network effects, tooling, battle-tested security, portability

  • Network effects: more developers, more liquidity, and more audited code than any other smart contract platform.
  • Mature tooling: compilers, test frameworks, debuggers, block explorers, and wallets have been refined over many years.
  • Battle-tested: the EVM has secured large amounts of value under constant attack since Ethereum's early years.
  • Portability: the same contract can be deployed across many EVM chains and L2s.

Limitations: sequential execution, wide-word overhead, contract size limit, storage costs

  • Sequential execution: transactions run one at a time, which limits throughput on a single chain.
  • Wide-word overhead: the large fixed-size words help with cryptography but add overhead to simple arithmetic.
  • Contract size limit: EIP-170 caps the size of deployed contract code. Large applications therefore split into multiple contracts or use proxy patterns.
  • Storage costs: permanent storage is expensive by design, because every node must keep it.
  • Design quirks: some patterns, such as calling external contracts before updating balances (which enables reentrancy), have caused high-profile contract bugs.

What's evolving: EOF and other proposals (no promised dates)

The EVM keeps changing through Ethereum Improvement Proposals (EIPs). One long-discussed proposal is the EVM Object Format (EOF). It would restructure bytecode into a versioned container that is validated at deployment. EOF has been debated and rescheduled, so treat it as ongoing research rather than a settled plan.

Other discussions cover parallel execution, contract size changes, and broader EVM improvements. Separately, some EVM chains experiment with raw performance. For example, MegaETH's documentation describes a ~10ms block time and a dual gas model while still running the EVM. For current status, follow ethereum.org's roadmap pages and eips.ethereum.org.

πŸ’‘ What it means for you: The EVM's age is both its strength and its weakness. It's the most tested smart contract platform, but it still carries early design choices that newer VMs avoid.

Choose Your Path: How Deep Do You Want to Go?

The concepts are covered. Pick the next stop that fits your goals:

πŸ…°οΈ Option A: "I just use dApps"

Go to the habits that protect your funds: Security Best Practices and Common Mistakes to Avoid.

πŸ…±οΈ Option B: "I want to read on-chain activity"

Try the Hands-On Etherscan exercise below. It takes about 10 minutes and needs no funds.

πŸ…² Option C: "I'm curious about building"

Open the Developer Peek to see Solidity become bytecode in your browser.

Hands-On: Read an EVM transaction on Etherscan

This exercise connects everything above to a real screen. You don't need a wallet connection or funds.

  1. Find a swap transaction. If you've swapped before, open MetaMask, go to the Activity tab, click the transaction, and choose View on block explorer. Otherwise, go to etherscan.io, type "Uniswap" into the search bar, open a router contract that Etherscan has labelled, and click any recent hash in its Transactions list.
  2. Check "Status." It shows Success or Failed. This is Step 5's commit-or-revert result.
  3. Check "Block." Note the block number and the count of Block Confirmations, which are the blocks added on top since then.
  4. Find "Gas Limit & Usage by Txn." Click More Details: + Click to show more. Compare gas used with the limit. The unused portion was never charged.
  5. Read the fee breakdown. Look at Transaction Fee, Gas Price, and Gas Fees (Base, Max, Max Priority). The Burnt fees line shows the EIP-1559 base fee being destroyed.
  6. Decode the calldata. Scroll to Input Data and click Decode Input Data to see which function was called, such as a swap function, and its parameters.
  7. Follow the tokens. Check ERC-20 Tokens Transferred, then open the Internal Txns tab, if present, to see contract-to-contract calls such as the WETH unwrap.
  8. Open the "Logs" tab. Each entry is an event the contracts emitted, such as Transfer or Swap.

πŸ”€ If the status is "Failed": read the message beside it. "Out of gas" means gas used equals the gas limit, so the whole budget was spent. "Execution reverted," often with a reason, means the contract deliberately stopped. Either way, the fee line shows what was paid. That's the taxi meter from Step 5.

A dedicated guide, How to Read a Smart Contract on Etherscan, is coming soon.

Developer Peek: From Solidity to bytecode in Remix (no deployment needed)

Open the Developer Peek (about 10 minutes)
  1. Go to Remix IDE. In the File Explorer, create a new file named SimpleStorage.sol.
  2. Paste the SimpleStorage contract from the "Bytecode and opcodes" section above.
  3. Open the Solidity Compiler tab and click Compile SimpleStorage.sol. Then click Compilation Details to view the bytecode and opcodes. Look for SSTORE.
  4. Open the Deploy & Run Transactions tab, choose a Remix VM environment (a simulated chain in your browser, using no real ETH), and click Deploy.
  5. Expand the deployed contract. Enter a number beside the orange set button and click it. In the terminal, expand the log entry to see the gas cost. Then click the blue number button. That is a free read-only call, not a transaction.
  6. For a closer look, open the evm.codes playground, select Solidity, paste the contract, run it, and step through execution while watching the Stack panel.

Payoff: you just watched the stack of plates in action, and you saw that writing to storage costs gas while reading does not.

Security Best Practices

The EVM executes exactly what you sign, so your habits at the signing screen matter most.

Understand what you're signing: approvals, permits, and delegations

The approve() call from the running swap example can grant an unlimited allowance. That lets the approved contract move those tokens later, even long after your swap. If the contract is malicious or later compromised, the allowance can be drained.

  • Approvals: set custom, exact amounts when your wallet allows it.
  • Permit signatures (EIP-2612 and Permit2): these are off-chain signatures that cost no gas, which makes them attractive to phishers. A signature can authorize spending just like an on-chain approval.
  • EIP-7702 delegations: since Pectra, treat any unexpected request to delegate your account to contract code as highly suspicious.

Review and revoke old approvals regularly. A dedicated guide, How to Revoke Token Approvals, is coming soon.

Verify contracts and use simulation tools

  • On Etherscan, check the contract's Contract tab for a verified checkmark, which means the published source code matches the deployed bytecode.
  • Get the official contract address from the project's own documentation, not from search ads or social media replies.
  • Use your wallet's transaction preview or a simulation tool to see expected balance changes before signing.

Be careful with bridges between EVM chains

Bridges move assets between EVM networks. They often hold large pools of locked assets and have been frequent targets for attackers. Prefer canonical or native bridges where practical, and learn whether a bridge relies on a small group of signers. A dedicated guide, What Is a Crypto Bridge?, is coming soon.

Use a hardware wallet for meaningful amounts

A hardware wallet keeps your private key offline and shows transaction details on its own screen. Because every EVM chain uses the same key-to-address math, one device can secure your address across Ethereum and its L2s. A dedicated guide, Best Hardware Wallets, is coming soon.

πŸ’‘ What it means for you: The EVM will execute exactly what you sign, including a malicious approval. Reading the signing screen is your strongest defense.

⚠️ Common Mistakes to Avoid

  • Assuming failed transactions are free
  • Sending funds on the wrong EVM network
  • Treating "EVM-compatible" as "as secure as Ethereum"
  • Misunderstanding whether contracts can change
  • Lowering the gas limit to "save money"
  • Believing your coins are stored in your wallet app

"Failed transactions are free"

Reality: all work done before a revert costs gas, and an out-of-gas failure consumes the entire limit. Fix: check your slippage, balances, and approvals first, and use your wallet's preview or simulation.

Sending funds on the wrong EVM network

Reality: your address is the same on every EVM chain, but each chain keeps a separate ledger. Funds sent to your own EOA on another chain can usually be reached by switching networks with the same key. Funds sent to a contract, to an exchange deposit address on an unsupported network, or to a multisig that isn't deployed on that chain may be lost.

Fix: confirm the network name and chain ID, and always use the network your exchange lists for deposits. A dedicated guide, How to Add a Network to MetaMask, is coming soon.

Assuming "EVM-compatible" means "as secure as Ethereum"

Reality: compatible chains have different validator sets, bridges, and admin keys. Fix: check L2BEAT for rollups and read the chain's own documentation on how it is secured.

Thinking smart contracts can (or can't) be edited

Reality: deployed bytecode can't be changed. However, many protocols use upgradeable proxy contracts, where an admin or multisig can point the proxy to new code. Fix: on Etherscan, look for proxy labels and "Read as Proxy" options, and find out who controls upgrades.

Setting gas limits too low

Reality: you pay only for gas actually used, so a lower limit saves nothing. It only raises the risk of an out-of-gas failure that burns the full limit. Fix: keep your wallet's gas limit estimate and adjust the fee instead.

Bonus myth: "My coins are stored in my wallet"

Reality: balances live in Ethereum's world state. Your wallet holds the keys that authorize changes to that state. Lose the keys, and the wallet app can't help you.

Frequently Asked Questions

What is the EVM in simple terms?

The EVM is the engine that runs smart contracts on Ethereum. Every node runs its own copy, and every copy follows identical rules, so all nodes reach the same result for the same transactions. That shared, verifiable result is what lets people use apps like DEXs and lending markets without trusting a central company.

What does EVM stand for in crypto?

EVM stands for Ethereum Virtual Machine. "Virtual machine" means software that behaves like a computer with its own instructions and memory, isolated from the hardware it runs on. The term also appears in phrases such as "EVM-compatible" and "zkEVM," which describe other networks that run the same kind of execution environment.

Is the EVM a blockchain?

No. The EVM is the execution engine, not the blockchain itself. The blockchain is the ordered record of blocks, and the consensus layer decides which blocks are valid. The EVM processes the transactions inside those blocks and updates the world state. Many different blockchains can run their own instance of the EVM.

What programming language does the EVM use?

The EVM itself runs bytecode, a low-level series of opcodes. Developers usually write contracts in higher-level languages, most commonly Solidity, with Vyper as a popular alternative. A compiler translates that code into bytecode before it is deployed. Users never need to read bytecode directly.

What is an EVM-compatible chain?

An EVM-compatible chain can run smart contracts written for Ethereum and works with Ethereum tools such as MetaMask, using the same address format. Examples include BNB Smart Chain, Polygon PoS, and Avalanche C-Chain. Compatibility covers code and tools, not security. Each chain has its own validators and trust assumptions.

Is Solana EVM-compatible?

Not natively. Solana uses its own virtual machine, the SVM (Sealevel), which executes transactions in parallel and uses a different account model and address format. Some third-party projects offer EVM environments that connect to Solana, but these add their own trust assumptions. A MetaMask address doesn't work natively on Solana.

Is Bitcoin EVM-compatible?

No. Bitcoin uses Bitcoin Script, a deliberately limited language designed mainly for spending conditions. Some sidechains and Layer 2 projects built around Bitcoin, such as Rootstock, offer EVM execution. These networks have their own security models and bridges, so they don't inherit Bitcoin's security automatically.

What is a zkEVM?

A zkEVM is a system that runs EVM-style execution and produces a zero-knowledge validity proof that the computation was correct. Ethereum verifies that proof, so no long challenge window is needed. zkEVMs range from fully Ethereum-equivalent (Type 1) to designs that compile Solidity to a different VM (Type 4).

Why does the EVM need gas?

Gas meters every computation so that no program can run forever or overload the network. Each opcode costs gas, and each transaction has a gas limit. Gas also prices scarce resources fairly: actions that write permanent storage, which every node must keep, cost more than simple transfers.

Can the EVM be hacked?

The EVM itself has proven very robust, partly because several independent clients implement it. Almost all losses come from elsewhere: bugs in individual smart contracts, compromised private keys, phishing signatures, malicious approvals, or flawed bridges. The EVM executes code exactly as written, including buggy or malicious code.

What is an EVM address, and why does it work on multiple chains?

An EVM address is a hexadecimal string beginning with 0x, derived from your public key with Keccak-256 hashing. Every EVM chain uses the same secp256k1 and Keccak-256 math, so the same private key produces the same address everywhere. Balances, however, are tracked separately on each chain.

Why did my transaction fail but still charge a gas fee?

Validators and nodes did real work executing your transaction up to the point where it failed. If the contract reverted, for example because of a slippage limit, you pay for the gas used until then. If the transaction ran out of gas, the full gas limit is consumed. State changes are undone either way.

What's Next?

You now have a practical answer to what is EVM, and you can explain it to a friend. Here's a quick recap, followed by where to go next.

Key takeaways

  • The EVM is the shared, sandboxed engine that every Ethereum node runs to execute smart contracts and agree on the same result.
  • Contracts compile to bytecode. The EVM runs it opcode by opcode on a stack, using memory, storage, and calldata, and storage writes are the expensive part.
  • Gas meters every step. Fee = gas used Γ— (base fee + priority fee). The base fee is designed to be burned, and failed transactions still pay for the work done.
  • When you confirm a transaction, you sign it, it waits in the mempool, a validator includes it, the EVM executes it, it commits or reverts, and every node re-verifies it.
  • "EVM-compatible" means shared tools, contracts, and address format, not shared security. Check chain IDs, and check L2BEAT before trusting a network.
  • Rollups and zkEVMs bring the EVM to cheaper Layer 2s. Alternatives like the SVM and Move VMs give up the EVM's ecosystem in exchange for parallel execution and other design choices.
  • Your safety habits: check the network, approve exact amounts, verify contracts, and use a hardware wallet.

Now that you've completed this guide, you might want to:

If you just use dApps

  • What Are Layer 2s? (coming soon): use EVM apps at lower cost
  • Ethereum Gas Fees Explained (coming soon): time your transactions better
  • DeFi for Beginners (coming soon): put your EVM knowledge to work safely

If you want to read on-chain data

  • How to Use Etherscan (coming soon): go beyond the exercise above
  • What Are ERC-20 Tokens? (coming soon): understand the token standard behind your swap

If you're curious about building

  • What Is Solidity? (coming soon): the most common language for writing EVM contracts
  • What Is a zkEVM? (coming soon): a deeper look at proving EVM execution

Further reading (authoritative sources)

Your next action: open your most recent transaction on Etherscan and find its status, gas used, fee, and decoded input data. Once you can read those four fields, you understand what the EVM did with your click.

Sources