What Is the Ethereum Virtual Machine? How Does It Work?

By Brian Nibley · November 04, 2021 · 6 minute read

We’re here to help! First and foremost, SoFi Learn strives to be a beneficial resource to you as you navigate your financial journey. Read more We develop content that covers a variety of financial topics. Sometimes, that content may include information about products, features, or services that SoFi does not provide. We aim to break down complicated concepts, loop you in on the latest trends, and keep you up-to-date on the stuff you can use to help get your money right. Read less

What Is the Ethereum Virtual Machine? How Does It Work?

You may have heard of Ether (ETH), the second largest cryptocurrency by market cap. And if you use the terms ETH and Ethereum interchangeably in conversation, you’re definitely not alone.

But there’s a distinction to be made between ETH, the crypto, and Ethereum, the network. As with most cryptocurrencies, Ethereum involves both a digital asset and a blockchain. The Ethereum network is a blockchain designed for smart contracts.

Developers can create programs using smart contracts for a variety of purposes, including the use of decentralized applications. They’re able to do this because of the Ethereum Virtual Machine (EVM).

Ethereum Virtual Machine Definition

The Ethereum Virtual Machine is the software platform that developers can use to create decentralized applications (DApps) on Ethereum. This virtual machine is where all Ethereum accounts and smart contracts live.

The Ethereum EVM does away with the need for powerful hardware, and is thought to be suitable for beginner programmers. That said, deeper understanding of the Ethereum virtual machine and EVM code would require knowledge of computer science terms like memory, bytes, and a stack, and also blockchain concepts like proof of work, the Merkle Tree, and hash functions.

In this article we’ll cover the basics of the EVM and how it works.

What is the Purpose of the Ethereum Virtual Machine?

The purpose of the EVM is to determine what the overall state of Ethereum will be for each block in the blockchain.

Ethereum is much like other blockchain-based networks in that it has its own native cryptocurrency (ETH), and uses a distributed ledger to maintain a database of transactions while enforcing specific rules for how people can operate on the network. However, Ethereum has an additional layer of functioning because of its smart contract capability.

This second layer has been referred to as a “distributed state machine.” On the simplest level, Ethereum’s state is a large database that holds all ETH accounts and balances.

At the same time, Ethereum’s state is also a machine state, capable of changing with each new block, in accordance with a set of predefined rules which can execute any kind of machine code. The specific rules that determine how the machine will change state during each new block are defined by the Ethereum Virtual Machine.

An Intro to Smart Contracts

Smart contracts are programs that run on the Ethereum blockchain. The contract is a collection of data and code that resides at an address on Ethereum.

A smart contract exists as a type of Ethereum account. Like other accounts, they have the ability to send transactions over the network. But instead of being controlled by a user, smart contracts get deployed to the network where they function according to the way they have been programmed.

User accounts then have the ability to interact with the smart contract. Doing so involves sending transactions that execute certain functions defined by the contract. Smart contracts share a few different attributes: they enforce pre-determined rules through their code, they cannot be deleted, and transactions with them cannot be reversed.

How Does Gas Relate to the Performance of EVM?

Every action taken on Ethereum represents an ETH transaction. Transactions require fees. On Ethereum, fees are referred to as Gas, as in the gas that powers decentralized applications.

During times of high network activity with many transactions happening, Gas fees tend to go up. At times, it can cost as much as $10 or $20 worth of ETH to make a simple transaction.

How Is Data Stored in Ethereum?

Data is managed on Ethereum using trie (tree-like) data structures. Data like account balances don’t get directly stored in the blocks of the Ethereum blockchain. Only root node hashes of transactions, states, and receipts are held on the chain.

Two distinct data types exist in Ethereum — permanent data and ephemeral data.

Permanent Data

Transactions are a type of permanent data. Once a transaction gets confirmed, it will be recorded in the transaction trie (a tree-like data structure) and never be altered.

Ephemeral Data

The balance of an account address would be an example of ephemeral data. The balance held in an account address gets stored in the state trie and will be altered when transactions are sent by or received to that address. In this way, permanent data like mined transactions and ephemeral data like account balances are stored separately.

Ethereum record-keeping is much like bank record-keeping. One analogy would be using a debit card. Banks track the amount of money each debit card has, and when individuals need to spend money, the bank checks its record to make sure the account has the necessary balance before the transaction is approved.

Benefits of the Ethereum Virtual Machine

•   The EVM allows anyone to create their own DApp. There are endless potential use cases for this kind of software, and the technology isn’t restricted to a certain group of people or those with a lot of money or connections.

•   There are many potential benefits of smart contracts. A recent example would be non-fungible tokens (NFTs). By creating NFTs, anyone can create digital art and sell it on a decentralized marketplace. This democratizes access to the art market in a virtual way, something that wasn’t possible before.

Downsides of the Ethereum Virtual Machine

•   The EVM network isn’t entirely decentralized. The vast majority of Ethereum nodes are hosted on centralized cloud servers like Amazon Web Services. If the owners of such services decide they don’t like Ethereum for some reason, the nodes could easily be shut down, damaging or destroying the network. This has happened before with certain social media apps, for example.

•   The EVM requires some technical knowledge. Those who don’t know how to code can’t do much with the EVM. More user-friendly interfaces are still in the process of being developed. NFTs are a good example again — there are programs that have graphical user interfaces (GUIs) that allow almost anyone to create NFTs and use related marketplaces.

•   High gas fees during times of network congestion. This can be a big downside for users of Ethereum. While those sending large transactions might not be affected as much, everyone trying to send smaller transactions might be unable to use the network for a time. In particular, this creates problems for decentralized applications. When a lot of users are interacting with the DApps’ smart contracts and creating many transactions, things can slow down to a crawl or even stop working when gas fees get too high.

The Takeaway

Ethereum is a transaction-based “state” machine, and as such, others can build any transaction-based state machine concept on it. An Ethereum virtual machine (EVM) specification of almost any kind can be used by developers to create smart contracts for many different reasons.

Photo credit: iStock/nortonrsx

SoFi Invest®
SoFi Invest encompasses two distinct companies, with various products and services offered to investors as described below: Individual customer accounts may be subject to the terms applicable to one or more of these platforms.
1) Automated Investing and advisory services are provided by SoFi Wealth LLC, an SEC-registered investment adviser (“SoFi Wealth“). Brokerage services are provided to SoFi Wealth LLC by SoFi Securities LLC.
2) Active Investing and brokerage services are provided by SoFi Securities LLC, Member FINRA (www.finra.org)/SIPC(www.sipc.org). Clearing and custody of all securities are provided by APEX Clearing Corporation.
For additional disclosures related to the SoFi Invest platforms described above please visit SoFi.com/legal.
Neither the Investment Advisor Representatives of SoFi Wealth, nor the Registered Representatives of SoFi Securities are compensated for the sale of any product or service sold through any SoFi Invest platform.

Crypto: Bitcoin and other cryptocurrencies aren’t endorsed or guaranteed by any government, are volatile, and involve a high degree of risk. Consumer protection and securities laws don’t regulate cryptocurrencies to the same degree as traditional brokerage and investment products. Research and knowledge are essential prerequisites before engaging with any cryptocurrency. US regulators, including FINRA , the SEC , and the CFPB , have issued public advisories concerning digital asset risk. Cryptocurrency purchases should not be made with funds drawn from financial products including student loans, personal loans, mortgage refinancing, savings, retirement funds or traditional investments. Limitations apply to trading certain crypto assets and may not be available to residents of all states.

Third-Party Brand Mentions: No brands, products, or companies mentioned are affiliated with SoFi, nor do they endorse or sponsor this article. Third-party trademarks referenced herein are property of their respective owners.

Financial Tips & Strategies: The tips provided on this website are of a general nature and do not take into account your specific objectives, financial situation, and needs. You should always consider their appropriateness given your own circumstances.


All your finances.
All in one app.

SoFi QR code, Download now, scan this with your phone’s camera

All your finances.
All in one app.

App Store rating

SoFi iOS App, Download on the App Store
SoFi Android App, Get it on Google Play

TLS 1.2 Encrypted
Equal Housing Lender