What is EVM? Ethereum Virtual Machine
Amongst the many important qualities that make a successful blockchain network, EVM compatibility stands out as one of the most crucial for achieving user adoption and expanding the developer community.
We’ll cover what the Ethereum Virtual Machine or EVM is and why it is a critical piece to the growth of the blockchain ecosystem.
Simply put, the EVM is a computation engine that is in charge of deploying and executing smart contracts and computing the state for every new block added to the Ethereum blockchain.
Key Takeaways - EVM
The Ethereum Virtual Machine, or EVM, is a computation engine that is in charge of deploying and executing smart contracts and computing the state for every new block added to the Ethereum blockchain.
EVM compatibility is an essential feature of blockchains that have enable many popular networks - including Avalanche, Binance Smart Chain, Polygon, Solana, Harmony and Fantom - to become highly successful by reducing the barriers to entry for application developers to deploy smart contracts on these new chains due to the code being compatible with the Ethereum network.
EVM has some drawbacks, including the increase in gas fees which sometimes make dapps too expensive to use during times of network congestion. However, layer 2 scaling solutions like Optimistic and zk-rollups are aiming to solve this problem.
To better understand what this all means, it is important to first understand Ethereum, Dapps, Smart Contracts and Gas.
What is Ethereum?
Ethereum is a blockchain network that enables developers to launch their own tokens and build decentralized applications (Dapps) using smart contracts.
What are Dapps?
Decentralized applications (or Dapps) are applications that are built on top of blockchain protocols and leverage smart contract technology.
Dapps take many of the operating models of web2 platforms and traditional banking services and apply blockchain technology to make them operate in a format that is peer-to-peer, trustless and more transparent.
Ether (or ETH) is the currency of the Ethereum blockchain. It is used to pay miners to validate transactions and also used to pay for products and services on the various Dapps and marketplaces built on the Ethereum network (e.g purchasing NFTs on OpenSea).
What is a Smart Contract?
One of the core features of the Ethereum network is the ‘Smart Contract’, which is a type of computer program that executes a set of functions based on predefined rules or conditions set by the developer.
With smart contracts, users can conduct all kinds of agreements that involve anywhere from two individuals to several thousands of people without the need of an intermediary.
What is Gas?
Gas is a measure of how much computing power is needed to process transactions and power smart contracts and Dapps on the Ethereum network. Gas fees (priced in Eth or Gwei) are paid to miners on the Ethereum blockchain in order to validate a transaction.
What is the Ethereum Virtual Machine?
The EVM is a computation engine that is in charge of deploying and executing smart contracts and computing the state (i.e the latest record of token transfers and account balances reflected on the ledger) for every new block added to the Ethereum blockchain.
We can think of the EVM as a piece of software that sits on top of the hardware/node infrastructure of the blockchain and performs critical functions such as running and compiling code used for dApps and smart contracts.
What is a Virtual Machine?
The term ‘virtual machine’ (or VM) refers to the idea of virtualizing a physical computer. This means to run a software system that can replicate the functions of a hardware system, such as running other software programs and deploying applications.
VMs consist of a virtual “guest” machine (e.g MacOS VM or Ethereum VM) and a physical “host" machine (e.g a physical PC or a blockchain node).
In the traditional software industry, Virtual Machines enable businesses to run multiple operating systems that each function like independent computers on top of a single physical computer.
This allows the VM to run unique software that requires a different operating system from the user's underlying computer, create sandbox environments to test new programs or make use of different processing power requirements.
In the enterprise technology industry, virtual machines are typically used in on-premises and cloud environments and are offered by services like Azure and VMware.
How does the Ethereum Virtual Machine Work?
Ethereum nodes record and transmit copies of transaction and smart contract data on the Ethereum blockchain, which is then processed by the EVM to update the ledger.
By being positioned between the nodes and the smart contracts, the EVM can compile different kinds of smart contract code into a standard format known as ‘bytecode’, which makes it readable by the Ethereum network and therefore enables those transactions to be recorded by the Ethereum nodes.
This enables developers to adopt the EVM as a way to make smart contracts on different blockchains (including contracts for dapps and tokens) easily portable to and from the Ethereum network.
The EVM uses a stack-based architecture, which contains 3 memory types: Storage, Memory and Stack.
These memory types are used to access and store smart contract data along with changes in the network’s state.
What is Turing-completeness?
Turing completeness describes a standard in computer science where a programming language can be used to simulate a Turing machine by solving any computational problem.
A Turing machine is a mathematical model developed by famous Computer Scientist Alan Turing that conceptualizes a machine capable of solving any problem using a predefined set of rules to determine a result from a set of input variables.
The Ethereum virtual machine is considered to be ‘quasi-turing complete' because its ability to execute processes is limited by the amount of gas available to execute smart contracts at a given time.
Despite this limitation, the EVM software is flexible and agile enough to run any code executed by a developer, including Solidity, Python, Java and C++.
This makes it easier for developers to launch new blockchains using different coding languages that are compatible with the EVM.
What is EVM Compatibility?
EVM compatibility simply means the ability to write and deploy smart contract code that is compatible with the Ethereum virtual machine and can therefore be recognized by the Ethereum nodes.
The Benefits of EVM Compatibility
EVM compatibility has enabled many popular Layer 1 blockchains, including Avalanche, Binance Smart Chain, Polygon, Solana, Harmony and Fantom, to become highly successful by reducing the barriers to entry for application developers to deploy smart contracts on these new chains due to the code being compatible with the Ethereum network.
As we mentioned before, the EVM compiles different kinds of smart contract code into a bytecode, a standard format that is readable by the Ethereum network. This enables Dapp developers to seamlessly deploy the same code on Ethereum, Avalanche or Polygon without needing to conduct costly and time consuming smart contract audits.
This ‘plug and play’ capability greatly expands the possibilities for emerging blockchains to attract developers to their ecosystem by reducing the time it takes to launch new Dapps and begin capturing market share from within a brand new network.
This phenomenon occurred with the launch of Avalanche and DeFi apps like TraderJoe or Benqi-Finance that quickly emerged on the network due to the ability to seamlessly replicate the automated market maker functionality of Uniswap’s DEX and the smart contract lending functionality of Aave.
From a users perspective, there is a large incentive to adopt new EVM compatible chains because they allow users to become the first testers of a newly launched Dapp, which can lead to them being rewarded with airdrops (some of which have been worth as much as 6 figures).
New blockchains and Defi protocols often also provide early users with higher returns on the capital they deploy to staking or liquidity pools, which creates a greater incentive to purchase the network's tokens.
EVM compatibility is also essential for forming cross-chain bridges that enable funds to be transferred from one network to another with minimal friction.
Much of the success of Binance Smart Chain was due to the ease in which Ethereum users could transfer their ETH over to the new chain using the Binance bridge.
A few months later, similar bridges like the Avalanche bridge and SpookySwap's bridge on Fantom would emerge based on the same EVM compatibility.
Just like how a city can only thrive if it has bridges that allow for traffic to be directed in and out of the city, giving local businesses new customers to sell to and enabling the local government to increase its tax revenues, all blockchain networks need a certain level of interoperability with other blockchains in order to benefit from the network effects created by the movement of users and capital between chains.
Downsides of EVMs
Gas fees on Ethereum and EVM chains tend to rise significantly during times of network congestion. This is because the Ethereum network operates a ‘fee market’.
In a fee market, an increase in demand for block space leads to an increase in the gas fees that must be paid to miners in order to get your transaction confirmed in the next block.
EVM chains like Polygon solve the gas fee problem by leveraging layer 2 scaling solutions like Optimistic and zk-Rollups.
With rollups, transactions on Polygon are executed ‘off chain’ via payment channels or independent blockchains consisting of a smaller group of validators, and then periodically bundled together as one large transaction that is confirmed on the Ethereum network.
This allows the Polygon EVM to execute smart contracts and users to transact more frequently while saving on gas fees.
However, in order to make its network more scalable and lower the cost of gas fees, Polygon must sacrifice some decentralization, which also makes its network less secure.
Popular EVM Compatible Chains
- Avalanche
- Binance Smart Chain
- Polygon
- Harmony
- Fantom
- Celo Network
EVM Compatibility on Horizen
The Horizen network offers many unique advantages that blockchain developers have not yet been exposed to, including the following:
- Increased flexibility through consensus agnostic sidechain protocol
Using Zendoo, Horizen’s sidechain deployment protocol, developers can deploy their own independent blockchain that is based on any kind of consensus mechanism, including PoW, PoS, DAG, etc
This gives developers greater control and flexibility over the speed, security and decentralization of their applications.
- High transaction throughput
Developers can simultaneously manage up to 1,000 blockchain networks that each produce up to 1,000 transactions per second, enabling over 1 million transactions across 1,000 connected blockchains without compromising decentralization.
- Privacy preserving functionality
Horizen also offers privacy preserving capabilities through its use of zk-SNARKs.
zk-SNARKS enable transactions that are recorded on a sidechain network to be verified on the Horizen mainchain without the mainchain nodes having access to the data.
Conclusion
While many alternative L1s have emerged over the past year offering faster speeds and cheaper transaction fees, it’s clear to most in the crypto space that Ethereum still remains at the epicenter of the Dapp ecosystem.
Achieving EVM compatibility is the most efficient way to plug into the massive network of users and developers that Ethereum and other EVM compatible blockchains have captured over the past year, giving them the opportunity to reap the benefits that come with being the first to a brand new decentralized market.
To learn more about Horizen’s plans for EVM compatibility and other milestones, visit our Newsroom.
Frequently Asked Questions - EVM
What Is an Ethereum Virtual Machine (EVM)?
A computation engine that is in charge of deploying and executing smart contracts and computing the state for every new block added to the Ethereum blockchain.
What are Smart Contracts?
A type of computer program that executes a set of functions based on predefined rules or conditions set by the developer. With smart contracts, users can conduct all kinds of agreements that involve anywhere from two individuals to several thousands of people without the need of an intermediary.
What are the Benefits of EVM Compatibility?
EVM compatibility greatly expands the possibilities for emerging blockchains to attract developers to their ecosystem by reducing the time it takes to launch new Dapps and begin capturing market share from within a brand new network.
User also have an incentive to adopt new EVM compatible chains because they allow users to become the first testers of a newly launched Dapp, which can lead to them being rewarded with airdrops