What is the Ethereum Virtual Machine (EVM)? | QuickNode (2024)

5 min read

Overview

The Ethereum Virtual Machine (EVM) is a core piece of Ethereum that helps power the blockchain and smart contracts. It is vital in assisting Ethereum to achieve user adoption and decentralization. In this guide, we will take a detailed look at the EVM to learn what the EVM is and how it operates. Then, we will cover some key points to solidify our understanding.

Prefer a video walkthrough? Follow along with Sahil and learn about the Ethereum Virtual Machine (EVM) in 5 minutes.

Subscribe to our YouTube channel for more videos!

Subscribe

What You Will Need

  • Basic knowledge of Ethereum
  • Basic understanding of data structures and memory

What You Will Learn

  • What the Ethereum Virtual Machine (EVM) is
  • How the Ethereum Virtual Machine (EVM) operates
  • Key takeaways about the Ethereum Virtual Machine (EVM)

What is the EVM?

The Ethereum Virtual Machine (EVM) is the computation engine for Ethereum that manages the state of the blockchain and enables smart contract functionality. The EVM is contained within the client software (e.g., Geth, Nethermind, and more) that you need in order to run a node on Ethereum. Nodes on Ethereum keep copies of transaction data, which the EVM processes to update the distributed ledger. Generally speaking, nodes on Ethereum natively support the EVM as the client software implements this functionality.

Next, let us cover some of the tasks that the EVM performs.

The EVM participates in block creation and transaction execution. In block creation, the EVM sets standards for managing the state from block to block. These states are stored in a Merkle Patricia Trie and hold the ground truth state for Ethereum.

In transaction execution, the EVM executes tasks (e.g., function calls to a smart contract) by interpreting the instructions in Opcodes (machine instructions at a low level); however, the data is formatted in bytecode. To get the data into bytecode, you can use a programming language such as Solidity (i.e., the native programming language for smart contracts) to compile and deploy the smart contract using bytecode.

Note that when the EVM executes tasks, it is limited to the amount of gas provided by the transaction and the overall limitations of the EVM. Gas is a unit of measure for computing power on Ethereum.

To learn more about transactions, check out our guide on What are Ethereum Transactions?

Next, let us take a look at the architecture of the EVM.

How is the EVM designed?

The EVM operates off of a stack-based memory structure and contains memory components such as Memory, Storage, and Stack (which are used to read/write to the blockchain and manage state).

The EVM is considered quasi-turing complete, which means it can solve problems given a set of instructions and inputs but is limited to the amount of gas provided along with the transaction.

Now, let us cover how the EVM operates internally when a transaction's bytecode is being executed or when a new block is being created.

How does the EVM operate?

In this section, we will cover how the EVM operates. Note that this is a high level explanation and doesn't cover every operation of the EVM.

As we mentioned earlier, the EVM executes tasks formatted in bytecode which the EVM interprets in Opcodes. Let us explain how smart contract code (bytecode) is broken down into Opcodes.

For this example, we will reference the Simple storage contract (1_Storage.sol) on Remix.IDE. The simple storage contract's compiled bytecode looks like this:

608060405234801561001057600080fd5b50610150806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80632e64cec11461003b5780636057361d14610059575b600080fd5b610043610075565b60405161005091906100d9565b60405180910390f35b610073600480360381019061006e919061009d565b61007e565b005b60008054905090565b8060008190555050565b60008135905061009781610103565b92915050565b6000602082840312156100b3576100b26100fe565b5b60006100c184828501610088565b91505092915050565b6100d3816100f4565b82525050565b60006020820190506100ee60008301846100ca565b92915050565b6000819050919050565b600080fd5b61010c816100f4565b811461011757600080fd5b5056fea26469706673582212209a159a4f3847890f10bfb87871a61eba91c5dbf5ee3cf6398207e292eee22a1664736f6c63430008070033

You can see the same bytecode by going to Remix.IDE, navigating to the example 1_Storage.sol contract, and then compiling and clicking the Bytecode copy button.

Note that the EVM only uses 140 unique opcodes; however, there are a total of 256 Opcodes which are 1 byte in length. Now let us look at the bytecode for one of the functions in the contract (e.g., store()).

60003560e01c80632e64cec11461003b5780636057361d1461005957

Each byte in the example above refers to a different Opcode. For example, the first byte (e.g., 60) refers to a PUSH1 opcode, the next byte (e.g., 00) refers to the data being pushed, the third byte (60) refers to the PUSH1 opcode again, and the next byte refers to its input (e.g., e0). To see all the Opcodes for the function above, you can go to evm.codes/playground and input the bytecode into the IDE and click Run (make sure to select Bytecode in the dropdown.

Now that we know a bit more about how the EVM executes bytecode, let us move onto understanding the Ethereum state transition function.

The Ethereum State Transition Function

The Ethereum state transition function is a formula that the EVM processes every time it executes a transaction. The purpose of the function is to make sure transactions adhere to the transaction standard and are technically valid (e.g., correct nonce and valid signature). The formula is as follows:

In the formula above, Y(S, T) is the transition function that takes two arguments, S, which is the old state, and T, which is the new set of instructions. The output is signified as S'

You should now better understand how the EVM operates and is designed. Next, let us cover some key benefits of the EVM.

Key Takeaways

  • Turing complete: Ethereum being Turing complete allows it to be able to run arbitrary logic, unlike other blockchains such as Bitcoin.
  • Composability: Ethereum isn't the only EVM-compatible blockchain. Many Layer 1 (L1) and Layer 2 (L2) chains are EVM-compatible, making it easy to migrate and deploy contracts or transfer tokens between chains. Some examples are Polygon, BNB Smart Chain, Avalanche, and more.
  • Decentralization: The EVM empowers developers to deploy dApps (decentralized applications) on Ethereum.

Additional Resources

If you want to dive deeper into the EVM, check out the following resources:

Or if you're curious about creating your own smart contract, look at our An overview of how smart contracts work on Ethereum guide.

Final Thoughts

Kudos! You now understand a bit more about the EVM. Got ideas or questions, or want to show off what you have learned? Tell us on Discord or reach out to us via Twitter.

We ❤️ Feedback!

If you have any feedback or questions on this guide, let us know. We'd love to hear from you!

What is the Ethereum Virtual Machine (EVM)? | QuickNode (2024)

FAQs

What is the Ethereum Virtual Machine (EVM)? | QuickNode? ›

The Ethereum Virtual Machine (EVM) is a decentralized computing platform that executes smart contracts on the Ethereum blockchain. It enables the creation and execution of decentralized applications (dApps).

What is Ethereum virtual machine EVM? ›

What is the EVM? The Ethereum Virtual Machine (EVM) is a dynamic and isolated virtual stack implanted entirely throughout the Ethereum node. It is responsible for implementing contract bytecode. After writing them in complex languages, like Solidity, contracts are compiled to EVM bytecode.

What is EVM? ›

Electronic Voting Machine (also known as EVM) is voting using electronic means to either aid or take care of the chores of casting and counting votes. An EVM is designed with two units: the control unit and the balloting unit. These units are joined together by a cable.

What is an example of EVM in blockchain? ›

Besides the Ethereum blockchain network, several blockchains are EVM-compatible. This means they operate using the same standards and protocols as the Ethereum network. Examples include BNB Chain, Polygon, Avalanche, and Fantom, among others.

What coins are EVM? ›

EVM compatible chains include:
  • Avalanche (AVAX)
  • Cardano (ADA)
  • Ethereum (ETH)
  • Ethereum Classic (ETC)
  • Fantom (FTM)
  • Harmony (ONE)
  • Hedera Hashgraph (HBAR)
  • Near (NEAR)

What is EVM good for? ›

EVM helps team members understand their roles, responsibilities, and contributions to the project's overall success by measuring progress against clear, objective targets. Team members are more likely to feel motivated and engaged when their work is recognized and generates tangible progress toward the project's goals.

How does EVM function? ›

EVMs are stand-alone machines that use write once read many memory. They are self-contained, battery-powered and do not need any networking capability. They do not have any wireless or wired components that connect to the internet.

What is an EVM example? ›

Earned value management example – 1. Let's imagine we are building a wind power plant. The project is set to be completed in 10 months with an estimated cost of $500,000. The project has been running for 5 months now, the team has spent $220,000 and completed an amount of work worth $255,000.

Can EVM be hacked? ›

Further, the ECI- EVMs are not computer controlled, are stand alone machines and not connected to the internet and /or any other network at any point of time. Hence, there is no chance of hacking by remote devices.

Is EVM a software? ›

Earned Value Management (EVM) software, such as Spider Impact, is a project management tool designed to measure project performance and progress objectively. It combines measurements of scope, schedule, and cost in a single integrated system, providing accurate insights into project status.

Which blockchains use EVM? ›

EVM compatibility is a good stepping-stone in solving this issue, proven by some of the most used blockchains currently: Avalanche, Binance Smart Chain, Fantom Opera, and Polygon.

What language does Ethereum use for EVM? ›

Solidity is the primary programming language for developing smart contracts on the Ethereum Virtual Machine (EVM). However, Rust has emerged as a strong alternative in the blockchain ecosystem, especially for blockchains that support WebAssembly (Wasm), such as Polkadot, Klever and Solana.

Which wallets support EVM? ›

Coinbase is an EVM compatible software wallet. Apex wallet is a new Ethereum digital wallet used to store digital assets. 1inch is a DEX aggregator powering flexible swaps and trades through their native protocol. Cryptocurrency wallet that also lets users manage their DeFi and NFT portfolios.

What is the difference between EVM and Ethereum? ›

The Ethereum Virtual Machine (EVM) is the engine that powers the Ethereum blockchain. It's designed to run smart contracts and decentralized applications (dApps) securely and reliably. Think of the EVM as a universal computer that runs the same code exactly as intended, no matter where it is.

Who controls Ethereum? ›

As an open-source, decentralized network, Ethereum is maintained and guided by a decentralized network of hundreds of thousands of developers from around the world.

Who is the owner of Ethereum? ›

Ethereum founder Vitalik Buterin has revealed his own brand of "techno-optimism" that will use bitcoin and crypto to help build a decentralized AI that emphasizes security and privacy...

Is MetaMask an EVM? ›

MetaMask is natively Ethereum which means it supports EVM networks like Ethereum Mainnet, L2s like Linea and Optimism, and even Polygon. Now, with Snaps, you can connect to non-EVM networks like Starknet and Solana, and even manage Bitcoin with your MetaMask wallet.

Is Ethereum EVM compatible? ›

Ethereum (ETH)

The first and the largest EVM-compatible blockchain. Ethereum has an excellent community of developers and researchers working for its advancement. The Ethereum Roadmap starting with the Merge aims to lower transaction costs and increase the scalability of the network.

What blockchains are EVM enabled? ›

EVM compatible blockchains or EVM compatibility refers to the ability for a blockchain to run the EVM and execute Ethereum smart contracts. This means that developers can write & deploy the same smart contracts across multiple EVM blockchains, without needing to make significant changes to their code.

Is EVM an ERC20? ›

Is EVM an ERC20? No. These are two distinct concepts within the Ethereum ecosystem. The Ethereum Virtual Machine (EVM) is a decentralized environment that enables smart contract deployment and ensures Ethereum smart contracts run consistently across the network.

Top Articles
A trader’s guide to quantitative trading
Abus vs Kryptonite vs OnGuard | The Best Bike Lock
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Movies - EPIC Theatres
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Manual Maggio

Last Updated:

Views: 6282

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Manual Maggio

Birthday: 1998-01-20

Address: 359 Kelvin Stream, Lake Eldonview, MT 33517-1242

Phone: +577037762465

Job: Product Hospitality Supervisor

Hobby: Gardening, Web surfing, Video gaming, Amateur radio, Flag Football, Reading, Table tennis

Introduction: My name is Manual Maggio, I am a thankful, tender, adventurous, delightful, fantastic, proud, graceful person who loves writing and wants to share my knowledge and understanding with you.