Cointime

Download App
iOS & Android

What Is the Ethereum Virtual Machine

Validated Individual Expert

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 find out all together what it does in this article.

Defining 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.

Brief 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 EVM

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.

Comments

All Comments

Recommended for you

  • OpenTrade announces $4 million seed extension round led by AlbionVC

    OpenTrade has announced the completion of a $4 million seed extension financing round to build RWA-supported loan and stablecoin yield products. This round of financing was led by AlbionVC, with participation from a16z Crypto and CMCC Global. OpenTrade plans to use the funds to expand its operations and enhance its product capabilities.

  • BNB Chain Ecosystem Re-staking Infrastructure Kernel Receives Investment from Binance Labs

    BNB Chain's ecological re-staking infrastructure Kernel has announced that it has received investment from Binance Labs. As of now, its total financing amount has reached 10 million US dollars, with main investors including: SCB Limited, Laser Digital, Bankless Ventures, Hypersphere, Draper Dragon, DACM, CYPHER, ArkStream Capital, HTX Ventures, Avid VC, GSR, Cluster Capital, Longhash Ventures, Via BTC, Side Door Ventures, NOIA, and DWF Labs. It is reported that Kernel's mainnet is about to be launched. Kelp provides users with support for Ethereum liquidity re-staking services based on rsETH, while Gain provides DeFi, CeDeFi, and RWA income products. KERNEL tokens are designed to unify the governance and incentive mechanisms of Kelp, Kernel, and Gain, while providing rewards for early supporters of ecosystem development.

  • Morgan Stanley: The U.S. dollar will peak before the end of the year and enter a "bear market pattern" in 2025

    Morgan Stanley predicts that the strong US dollar will peak before the end of the year and then enter a "bearish market trend", slowly declining until 2025. The bank believes that due to the Bank of Japan's rate hikes and gradual easing actions by the Reserve Bank of Australia, the potential for the yen and Australian dollar to rise next year is the greatest.

  • Equation News calls out Binance for "insider trading": You are destroying the sentiment of the trading market

    On November 25th, Formula News reported that to those insider traders who participated in the listing of Binance perpetual contracts, please slow down when selling your chips next time. The WHY and CHEEMS crashes you caused resulted in a 100% negative return for everyone involved in the trade, and you are destroying the emotions of the trade. Earlier today, Binance announced the listing of 1000WHYUSDT and 1000CHEEMSUSDT perpetual contracts, which caused a short-term crash in WHY and CHEEMS and sparked intense discussion within the community.

  • Are we finally ready for a gas limit increase?

    There has been growing discussion around the possibility of increasing Ethereum’s gas throughput, either by raising the gas limit or reducing slot time. The key argument in favor of this is that the hardware requirements for running a validator have steadily decreased over the past four years.

  • Cointime August 17th News Express

    1.VanEck and 21Shares Solana ETF Form 19b-4 Suspected to be Removed from CBOE Website

  • Ethereum network gas fee falls back below 1 gwei

    According to Etherscan data, the current Ethereum network gas fee has fallen below 1 gwei, currently at 0.937 gwei.

  • Cointime August 10th News Express

    1. The U.S. Internal Revenue Service has released a new draft of the crypto tax form, which no longer requires filling in wallet addresses and transaction IDs

  • Ethereum ACDC #139: Pectra's Devnet 2 upgrade is under debugging, and the release date of Devnet 3 is still to be determined

    Christine Kim, Vice President of Galaxy Research, summarized the main content of the 139th ACDC conference call. The debugging of Pectra's upgraded Devnet 2 is currently underway, and the release date of Devnet 3 is yet to be determined. Developers will hold weekly testing update meetings starting from Monday to better coordinate the release of Pectra's Devnet. The decision to include EIP-7688 in Pectra's upgrade has been postponed again.

  • Ethereum network gas fee drops to 1 gwei

    According to Ether­scan data, the current gas fee on the Ethereum network has dropped to 1 gwei.