Understanding Ethereum Virtual Machine (EVM) | Ledger (2024)

By Lipsa Das

Understanding Ethereum Virtual Machine (EVM) | Ledger (1)

Apr 1, 2023 | Updated May 29, 2023

Read 6 min

Medium

Understanding Ethereum Virtual Machine (EVM) | Ledger (2)
KEY TAKEAWAYS:
— Ethereum Virtual Machine (or EVM) is a virtual computer that distributes information across the entire Ethereum network. It is responsible for executing smart contracts and updating the state of the blockchain.

— EVM is not just for Ethereum; many layer one and two blockchains use it, including Polygon, Arbitrum and Avalanche.

— EVM has improved interoperability and accessibility, powering countless decentralized applications and other use cases across multiple blockchains.

As the world’s most popular blockchain for smart contracts, Ethereum owes much of its success to the Ethereum Virtual Machine (EVM). From gas fees to smart contract execution, the Ethereum Virtual Machine is responsible for much of the magic behind the Ethereum blockchain. EVM also powers the ecosystem of other leading blockchains like Polygon, Binance Smart Chain, etc.

But what is the Ethereum Virtual Machine, and how does it work?

Let’s dig in and find out.

What Is the Ethereum Virtual Machine?

Ethereum Virtual Machine is software that executes programmable code on the blockchain (smart contracts) and determines the state of Ethereum after each successful block.

As a virtual machine, EVM doesn’t have a central computer or cloud — it distributes and executes information across hundreds of computers participating in the network, also called nodes. These nodes all run the same EVM code, which makes it easier to build software on Ethereum.

History of the Ethereum Virtual Machine

Before diving deep into what EVM does, let’s first understand how it came to be. Vitalik Buterin introduced the idea of Ethereum in 2013 — creating a decentralized platform for building applications. Vitalik’s idea eventually became the Ethereum network, and at the heart of that network is the EVM.

Interestingly, Vitalik claims that BitTorrent was the first decentralized app (or dApp) ever created in 2001. BitTorrent and the EVM are similar in that they are both peer-to-peer networks with no central authority, but they serve different purposes.

For instance, BitTorrent is great for a singular purpose i.e, sharing files. But EVM goes beyond just file sharing with decentralized applications (dApps).

The EVM provides a secure and reliable environment for running dApps, which is crucial, particularly while handling sensitive data or financial transactions.

What Does the Ethereum Virtual Machine Do?

Ethereum Virtual machine primarily functions as a runtime environment for smart contracts.

You can think of EVM as the “brain” behind the Ethereum network: It executes code and ensures the entire network agrees on the outcome of the code.

EVM powers many decentralized applications and NFTs on the Ethereum blockchain. Due to the flexibility and security of smart contracts, these dApps range from play-to-earn games to crypto lending and borrowing applications. With EVM, you can build these dApps in any programming language and execute timely transactions.

Further, EVM is capable of Turing completeness, which means that smart contracts can perform any combination of code and complex calculations. This includes complex computations like AI and cryptography, allowing for a wide range of use cases and applications.

Therefore, Ethereum dApps benefit from the security of a decentralized network, plus the flexibility of performing complex computations.

How the Ethereum Virtual Machine Works

The Ethereum Virtual Machine can implement smart contract logic and validate ownership of funds. To do so, it uses a stack-based architecture, which means the nodes come in a particular order. Having a strict pre-defined order helps Ethereum resist hacker attacks and increase efficiency. Further, a stack-based architecture is very versatile, and easily supports different types of instructions.

EVM supports different programming languages, but the most popular ones for developers are Vyper and Solidity. This is because developers write smart contracts and decentralized applications using these languages.

However, since EVM cannot understand English like humans, the network must translate the code before deploying it. This is where compilers come into play – software that acts as a translator between the machine and the developer.

Compilers convert human-readable Solidity code to the computer-friendly version in two components: an instruction format called “bytecode” and a specification technique called Contract ABI.

While Bytecode is the common language that the entire Ethereum network understands, Contract ABI defines how other applications can interact with each smart contract. Let’s understand how this works in the Ethereum blockchain.

First, each smart contract on the Ethereum blockchain goes through the Ethereum compiler, translating it to bytecode and Contract ABI.

Next, the bytecode and Contract ABI is deployed to the EVM, distributing it across the entire Ethereum network. Each node on the network receives and stores a copy of the bytecode, making it tamper-proof.

Now, the EVM has the job of simplifying the bytecode further for the computer. Each computer has pre-defined sets of instructions known as opcodes. Bytecode sequences correspond to and trigger these opcodes. Next, the EVM executes all of the requests represented by the opcode.

Advantages of the Ethereum Virtual Machine

Blockchains using the Ethereum Virtual machine are very developer-friendly, and therefore quite popular. EVM allows for a range of capabilities but here are some of the most prominent ones:

Cross Blockchain Support

The Ethereum Virtual Machine can support any blockchain with bytecode-compatible smart contracts. Therefore, several blockchains, such as Polygon and Avalanche, use EVM to power their ecosystems.

Isolated Sandbox

Although the EVM uses the same computer network for all applications, it can execute each code separately. There is no impact on the underlying blockchain or other data stored by the node computers. This allows for fast and efficient development.

Flexible Development

EVM can easily execute complex and customized smart contracts, such as those used for transactions on dApps, DeFi, games, and NFTs. It also has a large developer community that makes building software easier.

Cross-functional Across Operating Systems

Blockchains have a large number of computers participating in their network, each with different operating systems like MacOS, Windows etc. These operating systems are vastly different from the others, which makes it challenging to develop software. However, EVM allows us to standardize and run programs on multiple operating systems without writing separate code.

Disadvantages of the EVM

While building on Ethereum has many benefits, all good things come at a price. And in Ethereum, that price is high crypto gas fees.

The EVM has scalability limitations, meaning it can only handle a limited number of transactions per second. As a result, when the network is too crowded, the gas fees can shoot up very quickly.

Due to the popularity of Ethereum, it can become expensive to deploy custom smart contracts or bulky applications.You need to optimize your contracts for speed and efficiency, removing repetitive code or unnecessary functions. You also need to account for the fact that storage costs on Ethereum can be equally expensive.

Another disadvantage of EVM is that once you deploy a smart contract on the blockchain, you can’t change it. This can be a major problem if you discover a bug or vulnerability after deployment. In such cases, you’ll need to redeploy the entire contract, and the extra fees can add up quickly.

The Future of EVM

The future of EVM is bright, with growing adoption and exciting developments on the horizon.

For instance, with other blockchains using a common base such as EVM, interoperability is becoming easier. For instance, developers can easily create dApps compatible with multiple blockchains at once. Further, it’s easier to transfer funds between EVM-compatible blockchains, so new blockchains can scale faster.
Another exciting development for the EVM is the EOF upgrade in 2023. To explain, EOF stands for EVM Object Format and it will be the first upgrade to the Ethereum Virtual Machine since its inception in 2015. To learn more about the details, make sure you read the EOF documentation. But to give you a basic overview: EOF will significantly change how EVM works, allowing for cheaper and faster smart contracts and an overall increase in security.

Your Wallet on EVM blockchains

If you’ve ever wondered why your address is the same on your Ethereum wallet as it is on Polygon, let’s get into why.

Now, your wallets on EVM blockchains are “Externally Owned Accounts (EOA)”, which means they use traditional key pairs to access them. One of them is the public key, an identifier, and the other is the private key, the passphrase. Wallets are of two types: Software or hardware wallets. Software wallets are digital wallets that store your private keys on your computer or mobile device. On the other hand, hardware wallets store your private keys offline on a physical device.

No matter which of these wallets you have, all EVM-compatible blockchains use EVM as the base technology. Accordingly, they use the same addressing scheme. Wallet addresses on these blockchains start with “0x” followed by 40 characters of alphanumeric code.

That means you can use the same wallet address on all EVM-compatible blockchains, such as Ethereum, Binance Smart Chain, and Polygon.

Keep Your Assets Secure Using a Ledger Hardware Wallet

Although software wallets provide easy access, hardware wallets keep your crypto secure from physical or digital attacks. Your private key is stored offline, so your assets are completely in your control.

When it comes to security, Ledger’s industry-leading hardware wallets have you covered. Ledger’s devices have an advanced secure element chip, the preferred solution for securing critical data among banks and governments!

Secure your crypto assets with the ultimate protection of a hardware wallet like Ledger.

Understanding Ethereum Virtual Machine (EVM) | Ledger (2024)

FAQs

What is an Ethereum virtual machine EVM and how does it work? ›

Ethereum Virtual Machine (EVM) is a software that sets the rules of computing the state of the Ethereum network from block to block. The EVM is a core part of Ethereum as it executes smart contracts, processes transactions, and updates account balances.

What are the limitations of EVM Ethereum? ›

EVM Limitations

Gas fees are the costs to run smart contracts on Ethereum. More complex smart contracts need more gas, making them costly to use. The EVM also isn't fully decentralized. The blockchain is decentralized, but the EVM depends on miners and nodes to validate transactions.

Does EVM understand Solidity? ›

EVM Code​ Smart contracts are written in higher-level languages like Solidity and Vyper and eventually get compiled down to bytecode ( EVM Code ). This bytecode (smart contract instruction) is stored in Storage (in the account state fields) and can be accessed by other smart contracts and EOAs to read or interact with.

What is the difference between EVM and Ethereum? ›

EVM stands as the linchpin of Ethereum, providing a secure and efficient platform for the execution of smart contracts and decentralized applications. Its fostering of trustless transactions and enhancing transparency underscores its importance in the blockchain realm.

What is Ethereum virtual machine in simple terms? ›

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.

What really powers the Ethereum virtual machine? ›

What Powers the Ethereum Virtual Machine? The EVM is powered by the collective computing resources of the Ethereum network. It operates on a decentralized network of nodes, which are essentially individual computers or servers run by Ethereum participants.

When should EVM not be used? ›

Earned Value is an old-school way of viewing costs, schedule and scope together to determine your performance. EVM should never be used on Agile initiatives.

Why is it difficult to use EVM? ›

Project managers often find it challenging to set up the necessary systems and processes to collect accurate data for EVM calculations. Additionally, integrating EVM into existing project management practices can be complex, requiring training and change management efforts to ensure a smooth transition.

Why do EVM projects fail? ›

The study results could reflect that the lack of good and consistent communication and the inability to control risk are major influences on project failures when using EVM metrics.

Which coding language does the EVM use? ›

Solidity is the most popular blockchain programming language of the Ethereum Virtual Machine (EVM), also widely used across a range of EVM-compatible blockchains.

What is the best language for EVM? ›

Solidity is the dominant language for writing smart contracts on the Ethereum Virtual Machine (EVM). Its mature syntax, vast developer community, and abundant learning resources make it an ideal choice for both seasoned developers and newcomers to the smart contract realm.

What language is EVM written in? ›

The formal definition of the EVM is specified in the Ethereum Yellow Paper. EVMs have been implemented in C++, C#, Go, Haskell, Java, JavaScript, Python, Ruby, Rust, Elixir, Erlang, and soon WebAssembly.

What are the benefits of EVM Ethereum? ›

An EVM-compatible blockchain is the brain of the Ethereum blockchain. It makes it easier to create decentralized applications and smart contracts, and standardizes the use of wallets. As technologies innovate and the web3 blockchain evolves, the EVM blockchain is becoming the standard for developers.

How does the EVM work? ›

An EVM consists of two units, a control unit, and the ballot unit which are joined by a cable. The ballot unit consists of labeled buttons which facilitates voting by a voter with the control unit responsible for the operational control of the ballot units, storing of vote counts and display of results on LED displays.

What is the data structure of EVM? ›

Execution Environment of the EVM

Being stack-based, it operates using a data structure known as a stack for storing data. This structure is central to how the EVM manages computation. 1. Stack-Based Architecture: In a stack-based architecture, operations are performed using a last-in-first-out (LIFO) data structure.

What is EVM good for? ›

Earned value management is a technique for measuring project performance and assessing progress during project execution. This system aims to help you identify trends, predict problems, consider solutions, and manage performance more effectively.

What are the benefits of EVM in blockchain? ›

The EVM arranges numerous additional utilities to the blockchain so users can enjoy hassle-free running on the system. All nodes of Ethereum perform on EVM to keep consensus throughout the blockchain. EVM enables a special code to run on Ethereum, known as smart contracts.

Top Articles
Latest Posts
Article information

Author: Prof. An Powlowski

Last Updated:

Views: 5886

Rating: 4.3 / 5 (64 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Prof. An Powlowski

Birthday: 1992-09-29

Address: Apt. 994 8891 Orval Hill, Brittnyburgh, AZ 41023-0398

Phone: +26417467956738

Job: District Marketing Strategist

Hobby: Embroidery, Bodybuilding, Motor sports, Amateur radio, Wood carving, Whittling, Air sports

Introduction: My name is Prof. An Powlowski, I am a charming, helpful, attractive, good, graceful, thoughtful, vast person who loves writing and wants to share my knowledge and understanding with you.