What Is the Ethereum Virtual Machine (EVM)?

Author
Author
Anatol Antonovici
About Author

Anatol is a crypto and Web3 writer at Cryptonews, where he creates educational articles, guides, and reviews about everything related to crypto.

Fact Checked by
Senior Web3 Writer
Ines S. Tavares
About Author

Ines is the Senior Web3 Writer at Cryptonews. She writes research-driven, value-packed guides and reviews covering cryptocurrencies, exchanges, and other Web3 topics. Ines is constantly on the lookout...

Last updated: 
Why Trust Cryptonews
Cryptonews has covered the cryptocurrency industry topics since 2017, aiming to provide informative insights to our readers. Our journalists and analysts have extensive experience in market analysis and blockchain technologies. We strive to maintain high editorial standards, focusing on factual accuracy and balanced reporting across all areas - from cryptocurrencies and blockchain projects to industry events, products, and technological developments. Our ongoing presence in the industry reflects our commitment to delivering relevant information in the evolving world of digital assets. Read more about Cryptonews

The Ethereum Virtual Machine (EVM) serves as a decentralized computer for the Ethereum network. Its main function is to deploy and execute smart contracts, which are the backbone of decentralized applications (dApps) like Uniswap, OpenSea, or The Sandbox.

Without the EVM, Ethereum wouldn’t support smart contracts and wouldn’t host thousands of dApps across multiple use cases. Understanding this technology is essential for developers and crypto enthusiasts. In this article, we’ll break down the essence of the EVM.

It is arguably the most important innovation in crypto after Bitcoin, the first application of blockchain. Bitcoin was designed as a decentralized money system, but it is very rigid—you can’t do anything beyond moving coins between addresses.

Ethereum is regarded as a second-generation blockchain because its EVM component adds a layer of functionality. Thanks to smart contracts, which are self-executing programs, developers can build applications on top of a decentralized network, offering an unprecedented level of security, transparency, democratization, and censorship resistance.

Imagine a bank that cannot freeze your account without any reason, doesn’t go bankrupt overnight, doesn’t misuse your deposited funds for shady investments, doesn’t charge hidden fees, operates continuously, and is accessible from everywhere. Ethereum enables developers to build such dApps, with the EVM at the core.

Key Takeaways

  • The EVM is a decentralized, sandboxed runtime environment that allows smart contracts to execute. It is Turing-complete, meaning it can run any program given enough resources.
  • Every operation in the EVM consumes gas, a unit of computational effort required to execute transactions or smart contracts. Users must pay gas fees in ETH to incentivize network validators (miners or stakers).
  • The EVM is widely adopted across multiple blockchain networks beyond Ethereum, including Binance Smart Chain, Polygon, and Avalanche.

What Is EVM in Crypto?


Paying attention to the EVM’s name helps us demystify it. This technology represents a virtual computer – you can think of it as a global cloud computer. It is run by thousands of nodes, which are regular computers like the ones you and I use.

The EVM has many elements of a typical computer, including memory, storage, and a processing unit for computing numbers. However, web designers, music producers, or writers wouldn’t find it useful because it lacks the hardware components like a monitor or a keyboard. What this engine can do, however, is read and process smart contracts. That’s what it was created for.

Each Ethereum node runs software that computes the output of smart contract transactions. The EVM processes the smart contract code written by developers who build dApps, comprising all the instructions to make the app work smoothly.

Developers write human-readable code in a programming language like Solidity, but the EVM only understands bytecode made of zeros and ones. Therefore, dApp builders have to transpose their human code into bytecode, but we’ll get to this a bit later.

The main idea of the EVM is that it’s a decentralized virtual computer responsible for running smart contracts and dApps.

Achieving Turing Completeness

Ethereum is characterized as achieving Turing completeness, but what does even mean?

Being ‘Turing complete’ means to be able to perform any computation task and run any logic or program like a regular computer can do. This usually refers to abstract machines that can solve any problems based on algorithmic inputs.

The term comes from Alan Turing, a renowned British mathematician and computer scientist who lived at a time when most people had no idea what a computer was.

For Ethereum, Turing completeness is essential because it enables developers to build dApps that can do almost anything, such as processing financial operations, running games, and managing memberships and governance systems. Thanks to this ability, Ethereum can serve as the infrastructure for thousands of dApps across a wide range of use cases.

However, there is a catch – Turing complete systems can accidentally run forever in infinite loops, resulting in resource-intensive operations. To avoid this, the EVM uses gas fees for each operation within a smart contract. This limits how much work a program can do, preventing abuse and serving as a measure for required computational resources.

How Does the Ethereum Virtual Machine Work?


The EVM acts like a global virtual computer that monitors what every smart contract is doing. It makes sure that every activity on the Ethereum network – such as token transfers, non-fungible token (NFT) mints, or decentralized finance (DeFi) operations – is executed exactly as stipulated in the code.

This virtual machine is responsible for reading smart contracts, executing its instructions, and updating the blockchain network accordingly.

To achieve these tasks, developers have to compile their smart contracts written in Solidity. This means that they translate the Solidity code into bytecode, which the EVM can read and understand.

Also, the EVM operates as a state machine, managing the so-called state of the blockchain.

Blockchain state management and bytecode interpretation are the two key operations of the EVM, so let’s dive deeper into these.

EVM as a State Machine

To understand how the EVM operates as a state machine, let’s go back to Bitcoin. You can think of the oldest cryptocurrency as a giant spreadsheet that contains all balances. This spreadsheet updates with every block of transactions.

However, Ethereum also hosts smart contracts, so it’s more than just a dynamic spreadsheet. Instead, it represents a system of evolving “states,” where each state is a snapshot of the entire blockchain at a given time, containing balances and the current status of every smart contract. These states change whenever everyone sends a transaction, such as sending ETH or using a dApp. The EVM is responsible for managing these state transitions.

Basically, what the EVM does is to take the current state of Ethereum, process a transaction, and then produce a new state – a process occurring inside each Ethereum block.

For example, if you swap tokens on a decentralized exchange like Uniswap, the EVM updates your balance, the liquidity pool reserves, and any other variables affected, operating based on the instructions encoded in Uniswap’s smart contract. Elsewhere, Bitcoin’s system simply updates user balances without executing any contract logic.

Therefore, Ethereum is a distributed state machine instead of a distributed ledger.

There are two types of accounts engaging with the Ethereum network: externally owned accounts (EOA) and contract accounts (CA). EOA data is controlled by private keys, as in Bitcoin, while CA information is held within the smart contract itself. Simple transfers from one EOA to another don’t involve the EVM, but the rest of the operations imply a state update computed by the EVM. Still, the EVM treats both types of accounts equally due to contract abstraction.

Stack Architecture and Memory

The EVM relies on stack architecture to execute instructions. This means that the machine uses a stack where data is pushed and popped. Each stack contains up to 1024 items of 256-bit words, facilitating calculations during contract execution.

To ensure the smooth flow of smart contract execution, the EVM stores its data in three different areas: stack, memory, and storage.

  • Stack – As mentioned, all EVM computations occur on the stack, which has a depth of up to 1024 integers. This area requires the smallest gas fee.
  • Memory – the EVM also has a RAM-like memory component that offers temporary data storage during execution. This memory is erased after each transaction.
  • Storage – each account has a persistent storage area that is part of Ethereum’s state. It holds data like balances, contract data, computed results, etc. The space is unlimited, but it is the most expensive area in terms of gas fees.

Therefore, stack and memory are volatile, while storage is permanent.

Simple ETH transfers don’t involve smart contract execution, so the stack is used only slightly, if at all. However, everything related to smart contracts, such as engaging with dApps, involves all memory components.

EVM Opcodes and Bytecode

When developers write smart contracts, they use a programming language like Solidity, which was created specifically for Ethereum. However, as mentioned earlier, this code can be read by humans but not by the EVM. Therefore, before the smart contract can run on Ethereum, it has to be compiled into bytecode – a language of numbers that the EVM understands.

The bytecode system is made up of opcodes, which represent small instructions telling the EVM what to do step by step. These predetermined instructions may tell the EVM to add numbers, store data, send tokens, etc. The virtual machine uses over 100 opcodes.

Compiling smart contracts for the EVM means transforming Solidity code into opcodes. Every time a user sends a transaction to a smart contract, the EVM reads the contract’s bytecode, executes the opcodes line by line, and calculates the result. Every opcode requires gas, which serves two purposes:

  • It pays for the computation to incentivize nodes (computers running the network).
  • It prevents bad actors from running infinite loops or spamming the network.

By adding up all opcodes in a smart contract and multiplying by each opcode price, you get the gas price for using a smart contract.

An example of an opcode is CALL, which triggers message calls to connect smart contracts to other contracts or to EOAs. Most smart contract transactions involve message calls.

EVM Execution Model

To recap, here is how the Ethereum Virtual Machine works:

  • Step 1: Smart Contract Deployment
    Developers write smart contracts in Solidity. The contracts are then compiled into EVM bytecode, which is deployed to the Ethereum blockchain through a transaction. Once deployed, each contract gets a unique address and lives on-chain permanently.
  • Step 2: Transaction Creation
    Users and dApps initiate transactions to interact with contracts or transfer ETH. These transactions are broadcast across the network and added to the mempool with pending status.
  • Step 3: Execution in the EVM
    Each validator executes the transaction using its own instance of the EVM, which processes the instructions (opcodes) of the contract’s bytecode and updates the global state, including balances, storage, and contract data.
  • Step 4: Gas Fees
    Every operation during execution consumes gas. Users can set a gas limit, and if execution exceeds that limit, the transaction reverts. However, the gas is still paid to the validator.
  • Step 5: Memory, Stack, and Storage Management
    The EVM uses a stack-based architecture to manage instructions, and it relies on three memory components as explained earlier.
  • Step 6: Block Creation
    Executed transactions are bundled into blocks by validators based on Ethereum’s consensus rules.
  • Step 7: State Finality
    Once a transaction is confirmed and included in a block, the state changes (such as balances or contract updates) are recorded permanently and become publicly verifiable.

What Is EVM Used For?


The EVM ensures the functionality of Ethereum and enables it to host dApps. It is responsible for handling smart contract logic, managing state changes, and ensuring the decentralization of the network. Let’s briefly review its main uses:

Smart Contract Execution

The main purpose of the EVM is to help developers deploy smart contracts, which are the backbone of dApps.

Smart contracts are self-executing programs that settle automatically when the stipulated conditions are met. For example, thanks to smart contracts, companies can distribute monthly crypto payments to employees without manually inputting and calculating the funds.

With smart contracts, developers can build dApps like Uniswap, Aave, or decentralized games.

When a user interacts with a smart contract, the EVM processes its instructions and ensures the results align with the logic coded into the contract.

Decentralized Application (dApp) Hosting

Ethereum supports thousands of dApps across multiple use cases, including DeFi, gaming, infrastructure, ID, and digital art.

The EVM acts as the execution layer for these dApps, making sure that they behave identically across all nodes.

One of the most important sectors in crypto is DeFi, which comprises blockchain-based financial dApps that allow decentralized trading, lending, yield farming, and other activities.

As of April 2025, the total value locked (TVL) in DeFi apps is at over $95 billion, and Ethereum accounts for more than half of it.

Processing Transactions and State Changes

Every transaction initiated on Ethereum can potentially change the state, be it balances, NFT ownership, or DAO voting results. The EVM’s task is to calculate these changes and apply the results in the subsequent state.

The EVM monitors the storage and current contract states of related accounts, ensuring that the results of smart contract executions are reflected on-chain.

Gas Fee Calculation and Execution Costs

Every operation on Ethereum has a gas cost. These costs prevent spam and help prioritize transactions. The gas is paid in ETH and goes to the validator processing the transaction.

Users can manually set gas prices to prioritize their transactions. Validators can implement maximal extractable value (MEV) strategies to boost returns by ordering pending transactions within a block in a specific way.

Interoperability with EVM-Compatible Blockchains

While created for Ethereum, the EVM has eventually been adopted by other blockchain networks to ensure compatibility with Ethereum dApps. Examples of EVM chains include BNB Chain, Avalanche, and Sonic.

Many Layer 2 rollups, which are secondary chains designed to scale Ethereum, are also EVM compatible.

This allows developers to deploy the same Solidity contracts across multiple chains with little or no changes.

Security and Decentralization

By running the same code across thousands of nodes distributed across the globe, the EVM ensures a trustless environment and censorship resistance.

With Ethereum’s consensus mechanism, the EVM becomes a decentralized and secure computer that enables dApp development.

Key Features of EVM


The EVM is Ethereum’s execution layer offering several key features, adding a layer of functionality that the rigid Bitcoin cannot support.

These features power the Ethereum ecosystem and also ensure its scalability, interoperability, and security for all supported dApps.

Decentralization and Security

The EVM operates in a decentralized environment run by Ethereum’s consensus algorithm. It enables thousands of nodes to run the same smart contract code independently and arrive at the same result. This decentralized execution makes it resistant to control from any single entity. Today, there are over 10,000 nodes running the network, more than half of which are based in the U.S.

Every transaction on Ethereum is cryptographically signed and verified by these nodes, ensuring reliable execution without the need for third-party verification.

Thanks to this decentralized system, developers can build democratic and community-driven financial apps.

Gas Fees and Computation Costs

Another feature is the introduction of gas fees to prevent malicious behavior that may be exploited in Turing complete machines.

The EVM uses a gas fee model where each operation has a predefined gas cost. Here is the gas cost for some opcodes:

Thanks to gas fees, the EVM limits computation, preventing infinite loops and DDoS attacks. The gas model also incentivizes validators to do their job.

Compatibility and Interoperability

By replicating the EVM to other chains, the crypto industry has become less fragmented.

EVM compatibility allows developers to write smart contracts in Solidity and deploy them across different networks. They can easily migrate dApps from one chain to another.

You could argue that the EVM has become a universal standard for decentralized computation.

In DeFi, EVM chains account for nearly 80% of total TVL, with Ethereum dominating the EVM category with a 65% share. It is followed by Tron, BSC, Berachain, Base, Arbitrum, Avalanche, and Sonic.

Advantages of the EVM


The EVM offers multiple advantages for developers and end users:

  • Secure smart contract execution
  • Multi-chain compatibility lowers entry barriers.
  • Multiple use cases implemented across trustless and censorship-resistant environments.
  • All transactions and smart contract executions are public, enabling auditing from third-party experts

Limitations of the EVM


The EVM is a powerful tool, but it has its limitations. Here are a few drawbacks you should know about:

  • High gas prices for certain operations.
  • Network congestion can result in slow processing and higher gas fees.
  • While storage memory is unlimited, the gas prices for large space needs are very high.
  • Requires developers to be familiar with Solidity, which has been created specifically for Ethereum.
  • EVM can process only up to 30 transactions per second, which limits its scaling potential.

Conclusion


The EVM is Ethereum’s virtual engine that brings smart contracts to life. It adds a functional layer that first-generation networks, such as Bitcoin or Litecoin, were not able to support. The EVM transforms Ethereum from a simple ledger to a decentralized application infrastructure that can power a more democratic and transparent economy.

Thanks to the EVM, developers can build financial protocols, games, social apps, and other decentralized tools that can work without intermediaries.

With Layer 2 solutions and EVM-compatible Layer 1 chains, the EVM is extending its reach across a multi-chain ecosystem. Given its role in enabling interoperability, the EVM will likely remain a foundational technology in the years to come.

FAQs


What is EVM in crypto?

How does the EVM execute smart contracts?

What programming languages are used to develop EVM smart contracts?

Is the Ethereum Virtual Machine different from other blockchain virtual machines?

What are some Ethereum alternatives that use the EVM?

How does Ethereum 2.0 impact the EVM?

References

Logo

Why Trust Cryptonews

2M+
Active Monthly Users Around the World
250+
Guides and Reviews Articles
8
Years on the Market
70
International Team Authors
editors
+ 66 More

Best Crypto ICOs

Discover trending tokens still in presale — early-stage picks with potential

Explore Our Tools

Smart tools made for everyday crypto users

Market Overview

  • 7d
  • 1m
  • 1y
Market Cap
$3,575,760,016,937
4.47
Trending Crypto
Crypto News in numbers
editors
Authors List + 66 More
2M+
Active Monthly Users Around the World
250+
Guides and Reviews Articles
8
Years on the Market
70
International Team Authors

Similar Posts