Ethereum virtual machine (EVM) explained

what is evm

What is the Ethereum Virtual Machine (EVM)?

The Ethereum Virtual Machine (EVM) is a decentralized system that runs smart contracts and transactions on the Ethereum blockchain. The EVM is a virtual machine, meaning it’s a computer system that doesn’t physically exist. There isn’t some big computer in a server room running it—instead, the EVM runs digitally, powered by thousands of nodes (validators) spread across the world. Anyone can join in and help run the network as a node. That makes the system decentralized, reliable, and secure. The EVM is a core part of the network because it allows developers to build new decentralized apps (dApps).

One of the cool things about Ethereum’s virtual machine is that it’s a Turing-complete machine. A Turing machine is a theoretical model that describes what a computer or algorithm can calculate. Unlike regular computers, Turing machines are considered to have unlimited memory, and since any computer can run a Turing machine, the EVM can basically run on any computer.


Key Takeaways

  • The Ethereum Virtual Machine (EVM) executes all smart contracts and transactions on the Ethereum network.
  • EVM is a virtual and decentralized computer managed by thousands of nodes globally.
  • Smart contracts are written in programming languages like Solidity and then compiled into bytecode that the EVM can understand.
  • Because EVM is Turing-complete, developers can build complex and decentralized applications (dApps) with it.
  • The EVM plays a key role in tracking the state of the network, such as which smart contracts exist and the results of interactions with those contracts.

How does the Ethereum Virtual Machine (EVM) work?

The Ethereum Virtual Machine (EVM) works by converting smart contracts into bytecode. This is a programming language understood by the EVM. Bytecode is a programming language understood by most operating systems, making it very user-friendly. This allows nodes worldwide to easily understand the content of smart contracts, which are originally written in a more complex programming language (namely Solidity). All smart contracts created with the EVM are stored on the Ethereum blockchain.

Here’s how the bytecode works: when a user wants to interact with a smart contract, the user sends a transaction to the smart contract’s address. The transaction includes the bytecode along with the function the user wants to invoke. The EVM then reads the bytecode and executes the function.

Everything that happens with the EVM consumes computational power. This computational power is provided by nodes in the network that have staked Ethereum (staking). They ensure transactions are executed. To prevent network abuse, users pay gas fees. These are essentially virtual fuel costs paid to execute a transaction. Gas fees are paid in Ether (ETH) and rewarded to the validators who process the transactions. The amount of gas fees depends, among other things, on the complexity of the transaction. Sending ETH is less complex than creating a new smart contract.

Maintaining Ethereum’s database

Besides executing transactions and smart contracts, the Ethereum Virtual Machine has another function: maintaining the database of the Ethereum network, also called maintaining the stored data (state). The state records which smart contracts exist, the distribution of tokens across all ETH wallets, and all transactions. The state continuously changes because every transaction is stored in the database by the EVM. This happens in collaboration with the nodes, which verify that the changes are correct.

Ethereum Virtual Machine as a stack based machine

If we look deeper into how the Ethereum Virtual Machine works, we see that the EVM functions as a stack based machine. This means that while executing instructions, the EVM temporarily stores information on a stack.

This data is processed immediately during instruction execution and is intended for short term use. Additionally, the EVM uses temporary memory to remember extra data during execution. This temporary data is deleted after execution finishes.

The results of transactions and smart contract interactions that are permanent, such as changes in wallets, smart contracts, and smart contract code, are recorded in Ethereum’s permanent storage. This storage is part of the blockchain maintained by all nodes.

Why is the EVM important?

The Ethereum Virtual Machine is very important for the Ethereum blockchain because it ensures consensus is reached among nodes. They are the validators of the network who use the EVM to reach consensus in a decentralized way, ensuring that decisions on whether a transaction or smart contract is valid and reliable are made fairly and securely.

Furthermore, the EVM enables the creation of new decentralized applications (dApps) through the execution of smart contracts. DApps expand Ethereum’s ecosystem with new DeFi projects and NFT projects, among others.

Is the Ethereum Virtual Machine (EVM) used by other blockchains?

The Ethereum network is not the only blockchain that uses the Ethereum Virtual Machine. Other blockchains use the EVM, a variant of it, or are compatible with the EVM. Below is a list of blockchains that use or are compatible with the EVM:

  • Ethereum: The original and largest EVM blockchain.
  • Binance Smart Chain (BSC): Compatible with the EVM and known for its speed and low transaction fees (gas fees).
  • Polygon (Matic): A layer two solution built on Ethereum that uses the EVM and focuses on scaling the Ethereum ecosystem.
  • Avalanche (C Chain): Supports the EVM, allowing Ethereum smart contracts to easily migrate to Avalanche.
  • Harmony: Supports the EVM, enabling Ethereum smart contracts to run as on Ethereum itself.
  • Arbitrum: Like Polygon, a layer two solution aimed at improving scalability and lowering transaction costs. Arbitrum also uses the EVM.
  • Moonbeam / Moonriver: Running respectively on Polkadot and Kusama. Fully EVM compatible, allowing existing Ethereum smart contracts to be moved without changes.

Future of the Ethereum Virtual Machine (EVM)

The EVM is crucial for Ethereum and many EVM compatible blockchains. Layer two solutions and blockchains focused on cross chain interoperability often use the EVM or a variant of it, partly because the Ethereum ecosystem plays a very important role in the crypto market. As long as Ethereum remains popular and dApp developers use the EVM because it allows easy movement between compatible networks, the EVM will continue to play an important role.

Moreover, the development of the EVM is ongoing. Developers within the Ethereum community are working to improve the EVM.

Finally, more and more new layer two solutions using the EVM are emerging, such as zk rollups networks, which make the Ethereum ecosystem more scalable, faster, and cheaper.

Advantages and disadvantages of the EVM

Advantages of the EVM Disadvantages of the EVM
Decentralization: The decentralized nature of the EVM gives developers a lot of freedom while making the network resistant to manipulation. Scalability: The EVM on Ethereum relies on Ethereum’s transaction speeds and scalability. Ethereum is known to be slow, which can cause high transaction fees during network congestion.
Transparency: The Ethereum network and thus the EVM is open source and very transparent. Everyone can view the database and see which transactions were made, which wallets exist and what they hold, and which smart contracts are stored on the blockchain. Complexity: The EVM uses Solidity for developing smart contracts. This is a new programming language that developers need some time to get used to.
Security: The Ethereum blockchain is considered a secure platform thanks to the consensus mechanism, which uses nodes to validate transactions. Smart contracts created with the EVM benefit from this security. Security risks: Although the EVM is secure, there are risks associated with developing smart contracts. Bugs or exploits can result from errors in a contract.
Programmability: Because the EVM is a Turing complete machine, it is a program that nearly every computer can understand. This makes it suitable for developing new dApps.

Final thoughts

The Ethereum Virtual Machine (EVM) is essential for Ethereum’s operation and plays a central role in executing smart contracts and creating decentralized applications (dApps). Because the system is decentralized and operated by thousands of nodes, it is not only reliable but also secure and transparent.

The EVM is compatible with many other blockchains and layer two solutions, allowing developers to easily move or expand their projects to other networks.

Additionally, the EVM continues to evolve. Think of the rise of zk rollups, which further improve the network’s scalability and speed. As long as the Ethereum ecosystem grows and developers continue building with the EVM, this virtual machine will remain an indispensable link in the world of crypto and Web3.

About Finst

Finst is one of the leading cryptocurrency providers in The Netherlands and offers a best-in-class investment platform together with institutional-grade security standards and ultra-low trading fees. Finst is led by the ex-core team of DEGIRO and is registered as a Crypto Service Provider with De Nederlandsche Bank (DNB). Finst offers a full suite of crypto services including trading, custody, fiat on/off ramp, and staking for both retail and institutional investors.

The crypto platform you'll love

We are here to give you the tools, inspiration, and support you need to become a better investor.