Virtual Machines: The EVM and Beyond
Virtual machines (VM) are the backbone of programmable blockchains. They enable the execution of smart contracts and the secure processing of transactions. VMs provide a controlled and deterministic environment where code can run without trust in intermediaries. It’s effectively a virtualized instance of a computer that can perform almost all the functions of a computer. This includes running applications.
Today we dive into the concept of virtual machines and have a look at highly performant VM implementations that allow us to overcome the limitations of the Ethereum Virtual Machine, which was first to enable programmability on a decentralized trust layer.
Before we begin however, we want to thank Fluent for being the title sponsor for Modular March! Fluent is a zkWasm-based Ethereum that is aiming to onboard the 20M developers across the world into web3. They’re live on private testnet today.
EVM - The Pioneer of Blockchain Programmability
The EVM sits on top of the Ethereum hardware & node layer. Its main purpose is computing the network's state & compiling various types of smart contract code (written in human-readable languages) into a machine-readable format called bytecode to run the smart contracts.
The EVM hence powers smart contract execution and is one of the core features of Ethereum. Instead of a classic distributed ledger of transactions, the EVM basically transforms Ethereum into a distributed state machine.
Ethereum's state is a large data structure that holds not only all accounts & balances, but also an overall network or machine state which can change from block to block according to a pre-defined set of rules. The specific rules of changing state from block to block are defined by the EVM. At any given block in the chain, Ethereum has one & only one canonical state with the rules for valid state transition being defined by the EVM spec.
Virtual Machines beyond the EVM
Ethereum has paved the way for smart contract development. Apps on Ethereum are expressed in a format called EVM bytecode. Expressing the programs in a standard bytecode format allows program execution to be sandboxed & platform-agnostic. EVM bytecode is also battle-tested & reliable.
It has reached critical mass as the dominant smart contract standard, which is proven by data. EVM (Solidity & Vyper) apps account for over 95% of TVL in DeFi according to DefiLlama with >20 supporting chains. It's the safe choice for devs wanting to maximize code portability.
However, the EVM does come with a significant limitation, that all EVM chains fall victim to, namely sequential execution. The EVM can only execute one transaction at a time! This is the simplest implementation, and simple is always a good first approach, but we need to evolve.
To overcome the limitations of Ethereum and its virtual machine, many teams started to build scalable blockchains run by high-spec nodes. This allows them to run more performant virtual machines that allow for parallel transaction processing and faster consensus. Prominent examples include Solana, Sui or Aptos.
However, the landscape is changing. Today, powerful infrastructure and rapid technological advancements fostered by a modular approach that drives innovation by highly specialized teams finally enables more performant VMs with a much higher throughput than the EVM to be run on L2. Thanks to the abundance of data (a.k.a. blob) space on a modular DA layer like Celestia, it becomes feasible to build customized L2 implementations that run Alt-VM execution environments, validate state on Ethereum, and post data to Celestia (or EigenDA).
Parallel Execution on L2
There are a few examples of teams that aim to make this vision of a multi-VM L2 ecosystem and parallel execution a reality. Two examples of high performance, parallelized VMs that we will see run on Ethereum L2 soon are Solana’s Sealevel VM and MoveVM (used by Aptos or Sui).
Eclipse for example is a modular execution layer using Solana Sealevel VM. While that allows for running programs written for Solana on the execution layer, Eclipse isn’t relying on Solana for security. Instead, settlement happens on Ethereum, while the DA solution is customized to Celestia’s modular DA layer. This introduces parallel execution and Rust smart contracts within the Ethereum ecosystem for the first time.
With Movement Labs, there is also a team that is working towards MoveVM execution layers on Ethereum (and beyond). While the MoveVM allows for parallelization, another key feature here is also the programming language, Move. Move is an open-source programming language originally developed by Meta's Diem Association team. It's designed to create customizable transaction logic & smart contracts and is based on Rust. It boasts a high level of security & expressivity, using resources drawn from the mathematical idea of linear logic. It allows devs to avoid mistakes that could lead to exploits, while minimizing gas fees compared to other smart contract chains like Ethereum. Move's executable format is “bytecode that is higher-level than assembly yet lower-level than a source language. The bytecode is checked on-chain for resource, type & memory safety by a bytecode verifier & then executed directly by a bytecode interpreter”. This allows for new use cases and more secure decentralized applications which enable use cases that can truly cater to the masses.
General Purpose Execution on L2
However, execution layer innovation is not only about scalability and parallelization. It’s also about breaking down barriers of entry and broadening the design space. A key trend in this regard will be Wasm-enabled execution layers.
An efficient binary instruction format for stack-based virtual machines, Wasm brings notable benefits over traditional smart contracts written in languages like Solidity. Exploring this in depth would go beyond the scope of this report. But in summary, Wasm smart contracts offer a plethora of benefits over Solidity contracts. This makes Wasm a robust choice for a wide array of applications. As the tech continues to evolve and gain adoption, Wasm is set to become an indispensable tool for blockchain developers. The benefits range from superior performance to its flexible language support (enabling development in C, C++, Rust, Typescript & more).
One example of a project that is working on making Wasm execution on Ethereum a reality is Fluent Labs, which is building a Wasm-powered, validity rollup that relies on a modular DA solution. Additionally, Arbitrum is among the leaders in the Wasm game, enabling broad language compatibility within the Orbit framework by introducing the Stylus VM.
& as always, a huge thank you to our Modular March sponsors! 🧱✨