What is the Ethereum Virtual Machine (EVM)?

When Vitalik Buterin built Ethereum, he wanted to push the boundaries of blockchain technology. Bitcoin inspired him, but he felt the tech should do more than just process transactions. As a result, he built the Ethereum blockchain network. Ethereum has all the features of Bitcoin. It can process peer-to-peer transactions and store them in an immutable and decentralized way. It can also do certain things that Bitcoin can’t. For example, it can run smart contracts.

So how does a blockchain run a smart contract? In Ethereum's case, the answer is the Ethereum Virtual Machine (EVM). The EVM forms the backbone of how the Ethereum network operates. In this article, we discuss what EVM is, how it works, and its benefits and use cases. But before we dive deep, let's have a quick recap on smart contracts.

TL;DR

  • Vitalik Buterin created Ethereum to pioneer the introduction of smart contracts. These self-executing contracts run on the Ethereum Virtual Machine (EVM).

  • EVM is a software that allows smart contracts to be run and be deployed on the Ethereum network.

  • EVM processes transactions in two states: world state (account balances and smart contracts) and machine state (executing transaction steps).

  • Smart contracts are written in Solidity and compiled into bytecode. The EVM executes them. Gas fees help to provide security and limit resource abuse.

  • The EVM’s impact is seen in cases like ERC-20 tokens, decentralized exchanges, NFTs, DeFi lending, and DAOs.

What are smart contracts?

Smart contracts are computer programs or applications that run autonomously on a blockchain network. They consist of data codes developers deploy to carry out specific instructions. Users don’t control smart contracts as they run as programmed.

The Ethereum network is the first blockchain to implement smart contracts. As a result, millions of smart contracts are coded and deployed on the Ethereum blockchain today. The EVM played a vital role in achieving that feat.

What is the Ethereum Virtual Machine (EVM)?

The EVM is built into the heart of its protocol. As its name suggests, the EVM is a virtual machine or digital software that powers the Ethereum network. Virtual machine software can execute programs, store data, connect to networks, and perform other computational tasks. It’s also responsible for the code execution and deployment of smart contracts.

How it works

Since Ethereum processes more than just peer-to-peer value transactions, it requires an intricate computation system. So, instead of calling the network a distributed ledger, Ethereum developers refer to it as an "unbounded state machine". And that's a basic description of how the EVM works. The Ethereum network therefore comprises two states: a world state and a machine state.

EVM

World state

The world state is where Ethereum stores its account balances and smart contracts. Similar to the Bitcoin ledger, it’s decentralized, immutable, and accessible to everyone online. The EVM updates this layer every time it completes a transaction. That means everyone with a block explorer can view the Ethereum blockchain and see the same data in real-time.

Machine state

The machine state is where the EVM carries out the step-by-step processing of transactions. It’s also popularly referred to as Ethereum's sandbox for developers. The Ethereum network processes two types of transactions. The first type is the "message call" — when one account transfers ETH tokens to another. In this scenario, the EVM moves the ETH tokens from one wallet address into another. Which then updates the transaction on the world state. The sender is charged gas fees for the computations completed in sending the transaction.

The second type of transaction is called ¨contract creation¨. It refers to when a developer wants to execute a smart contract onto Ethereum. In this scenario, the sender supplies gas fees and inputs a ¨smart contract bytecode¨.

Solidity programming language

The most widely used computer language for creating Ethereum smart contracts is Solidity. Like Javascript, it’s a high-level language suitable for humans, but machines don’t understand it. Therefore, once developers write a smart contract in Solidity, they must translate it into machine language or bytecodes using an Ethereum Virtual Machine compiler, like solc.

Smart contract execution

As the EVM executes the code, the gas supply reduces according to the gas cost of the computations executed. If at any point the gas supply is reduced to zero before the transaction is complete, the EVM immediately halts. It abandons the transaction and doesn’t change the world state. The network is unaffected, but the sender's ETH balance goes down to pay for the computations used to execute the code to the halting point. However, if the execution completes successfully, the EVM updates the world state to match the machine state version.

Ethereum gas fees

As we can see from the above, gas fees play a crucial role in processing transactions on the Ethereum blockchain. When Ethereum used the Proof of Work (PoW) consensus mechanism, processing a transaction required hardware and electricity, and miners required incentives to carry out their tasks. In the case of processing ETH token transfers, gas fees vary depending on the congestion of the pool.

When executing smart contracts, gas fees take on a different role. At the point of execution, Smart Contract bytecodes are broken down into smaller pieces called ¨opcodes¨. Opcodes are short for Operational Codes and are the instructions the EVM uses to perform computations. Each opcode is assigned a gas fee — the more complex the opcode, the higher the cost. This step is essential in keeping the Ethereum blockchain secure from malicious attacks. For example, if a user deploys a DDos attack, the EVM will continue executing the smart contract in the machine state. It’ll charge gas fees for every computation, and when the sender runs out of gas, it’ll abandon the transaction.

What are the benefits of EVM?

As described above, the EVM prevents malicious activities from attacking the network. Therefore, it enables the execution of smart contracts and other automated services in a secure and trustworthy platform.

The Ethereum network is the largest crypto ecosystem at the time of writing. What's more, it's considered the gold standard for decentralized application (DApp) creation and smart contract deployment. Many other blockchains have created side chains that allow Ethereum developers to transfer their applications without changing the code.

EVM is also decentralized, meaning anyone can create a smart contract on Ethereum without permission. It also enables developers to build and deploy decentralized services and applications, recently gaining massive popularity.

EVM use cases

With the Ethereum Virtual Machine executing smart contracts, many new inventions have hit the blockchain space. Here are the top five EVM use cases:

ERC-20 tokens

ERC-20 tokens are generated by smart contracts using predefined data structures. The data structure is responsible for giving the token a name, distributing it, and keeping track of it. In 2017, when initial coin offerings (ICOs) were popular, many new cryptocurrencies were launched using the ERC-20 tokens. Today, the best use of ERC-20 tokens is for stablecoins, like USDT.

Decentralized Exchanges (DEXs)

Decentralized exchanges (DEXs) allow users to buy, sell or trade crypto by deploying smart contracts. Exchanges such as Uniswap and SushiSwap also use automated market makers (AMMs) applications, allowing users to tap into the liquidity pools of tokens without third-party interference.

NFTs

Non-fungible tokens (NFTs) are digital artifacts stored on the blockchain. They authenticate ownership and can’t be copied. Blockchain enthusiasts use smart contracts to create and mint NFT collections. Some of the most expensive NFT collections include the Bored Ape Yacht Club (BAYC) and Cryptopunks. Owners can transfer or trade their NFTs on marketplaces such as OpenSea.

DeFi lending

Decentralized finance (DeFi) Lending refers to platforms that allow users to lend or borrow cryptocurrencies without using a third party. Smart contracts govern the borrowing and lending protocols. Loans are issued immediately to borrowers, and lenders sometimes receive interest daily.

Decentralized Autonomous Organizations

A decentralized autonomous organization (DAO) is a communal entity that lacks a central authority. In DAOs, individual members collectively make governing decisions regarding the project. The rules of a DAO are established by core community members and implemented through smart contracts.

EVM limitations

The EVM has two significant limitations. Firstly, it requires users to have foreknowledge of Solidity and coding skills. Many people need help coding, making it difficult for new users to create and interact with smart contracts.

Its second limitation is that gas fees can become very expensive when creating a smart contract or deploying an Ethereum network application.

Which cryptocurrencies are EVM compatible?

EVM-compatible blockchains are a simple solution to solving the expensive gas fee problem. Developers have borrowed certain parts of the Ethereum network and created DApps that enable users to quickly and easily move assets between any EVM network. Many of the most popular blockchains in use today follow this EVM-compatible approach, mainly:

The future of EVM

Building upon the basic foundation of Bitcoin, Vitalik Buterin's vision is to create a decentralized supercomputer that's accessible to all virtually. The Ethereum Virtual Machine has had a huge role in making that vision a reality. Since its conception, the EVM has had several upgrades and continues to evolve and improve.

The Dencun upgrade introduced EIP-4844, which brought proto-danksharding to Ethereum. This significantly reduces gas fees by allowing the network to process Layer-2 transaction data more efficiently. Proto-danksharding is underpinned by a new data type called blobs, which are removed from the blockchain rather than being permanently stored. Meanwhile, EIP-4788 — also part of the Dencun upgrade — helped to enhance interoperability by enabling EVM to access the state of the Beacon Chain directly. This is essential for protocols such as liquid staking and cross-chain interactions. The Dencun upgrade was completed in March 2024.

Looking ahead, Ethereum's roadmap emphasizes scalability through rollups, with zero-knowledge EVMs (zkEVMs) playing a crucial role. zkEVMs enable efficient off-chain transaction processing while maintaining compatibility with Ethereum, improving scalability.

The final word

The Ethereum Virtual Machine is part of the Ethereum network's foundational infrastructure. It's essential to allowing smart contracts to run on the blockchain, with the software responsible for performing multiple computational tasks. Beyond its operational importance, the EVM protects the network by helping prevent attacks, supporting a secure, resilient, and decentralized platform for developers to build upon.

Curios to learn more about the evolving Ethereum network? Check out our guide to the Blast Layer-2 that offers native yield, and read up on Curve Finance, the stablecoin decentralized exchange built on Ethereum.

FAQs

The Ethereum Virtual Machine (EVM) is a virtual software platform that powers the Ethereum blockchain, enabling it to execute and deploy smart contracts.

It’s important because it lets Ethereum do more complicated transactions than simple peer-to-peer value transfers. This makes it a useful platform for decentralized applications (DApps) and other automated services.

The EVM processes transactions through two states: the world state and the machine state. The world state records account balances and smart contracts, while the machine state handles the step-by-step execution of transactions.

The EVM may move tokens between accounts or run smart contract bytecodes, depending on the type of transaction. Gas fees determine the cost and completion of these calculations.

The EVM's key areas include creating ERC-20 tokens, decentralized exchanges like Uniswap, minting and trading NFTs, DeFi lending platforms, and community-governed Decentralized Autonomous Organizations (DAOs).

The EVM has two main limitations: complexity and high gas fees. Project owners creating smart contracts need to understand Solidity, the Ethereum programming language. Gas fees can also be very expensive, especially during network congestion or when deploying complex applications.

免責事項
本コンテンツは情報提供のみを目的としており、お住まいの地域では利用できない商品が言及されている場合があります。(i) 投資アドバイスまたは投資の推奨、(ii) 暗号資産/デジタル資産の売買・保有の申し出または勧誘、(iii) 金融、会計、法務、または税務のアドバイスを提供するものではありません。暗号資産(ステーブルコインや NFT を含む)の保有には高いリスクがあり、価格が大きく変動する場合があります。暗号資産の取引や保有がご自身の財務状況に適しているかどうか、十分にご検討ください。具体的な状況に関するご質問は、法務・税務・投資の専門家にご相談ください。本投稿に掲載されている情報(市場データや統計情報が含まれる場合など)は、一般的な情報提供のみを目的としています。一部のコンテンツは人工知能(AI)により生成、または支援されている場合があります。これらのデータやグラフの作成にあたっては合理的な注意を払っていますが、ここに示された事実上の誤りや省略に対していかなる責任も負いません。OKX Web3 ウォレットとそれに付随するサービスは OKX Exchange が提供するものではなく、OKX Web3 Ecosystem Terms of Service に従っています。

関連記事

さらに見る
Circle cross-chain transfers thumbnail
Stablecoins
Protocols

Understanding Circle's cross-chain transfer protocol: a comprehensive guide

Have you ever felt restricted by the boundaries of a single blockchain network when managing your assets? With cross-chain token transfers from financial services company Circle, restrictions are a thing of the past. They help break down those sometimes frustrating obstacles so you can move crypto like effortlessly from networks like and Cosmos.
2025年7月15日
2
OKX Launches Bitcoin Halving-Themed Competitions
Bitcoin

What is the Bitcoin 2024 halving and how could it impact crypto?

April 19, 2024 saw the arrival of the fourth Bitcoin halving event — a significant development affecting the asset's circulation. But what is the Bitcoin halving exactly? According to the Bitcoin white paper , it's a built-in feature of Bitcoin's programming that occurs approximately every four years. This unique event cuts the number of Bitcoins awarded to miners for processing transactions in half. Why does this matter? Well, it's all about supply and control.
2025年7月15日
中級者
25
Web3 rewrites social media
Research

Web1 to Web3: The rise of decentralized social media

The evolution of social media has been a fascinating journey. It started in the late 1990s when basic message board platforms and chat rooms dominated. This was a time when users were more concerned w
2025年7月15日
OKX Bot Trading
Trading guide
Blockchain
Trading basics

A beginner’s guide to IPOs: how cryptocurrency firms can go public

An initial public offering (IPO) is the process of a private company offering its shares to the public for the first time, allowing anyone to buy a stake in the company. This usually occurs when a company is looking to raise capital to fund its growth and expansion plans. IPOs have become increasingly popular among cryptocurrency firms in recent years, as they seek to gain mainstream recognition and credibility. This beginner’s guide will explore the IPO process and provide insights into how cryptocurrency firms can go public.
2025年7月15日
初心者
7
Forward Contracts vs. Futures Contracts What Are the Differences
NFT
Artificial intelligence

How generative AI is transforming the NFT space

Just as NFTs swept the scene in 2021 and 2022, AI is the talk of the town today. We've witnessed the evolution ChatGPT has contributed to copy and content, but what about art and digital collectibles?
2025年7月15日
3
Forward Contracts vs. Futures Contracts What Are the Differences
Research

Consortium blockchains: What you need to know

Blockchain is a type of distributed ledger technology (DLT) that facilitates the sharing and storage of data and information in groups called blocks. The emerging technology has gained substantial pop
2025年7月15日
5
さらに見る