Before the EVM, blockchains could only transfer cryptocurrency from one account to another. This was good for one-off payments, but not much else.
However, the creators of the EVM saw a future where the blockchain could run programs that executed complex logic and stored relevant data. Think of going from a single-stream soda dispenser, to mixing to your heart’s content on the CocaCola Freestyle: a complete game changer.
The EVM defines a protocol for how programs, called smart contracts, run on blockchains. Smart contracts are important because they provide a layer of customizability to the blockchain. They are the tools that developers use to create products directly on the blockchain, from games to new ways to power the economy.
… the EVM will become as well-known as other key internet protocols like HTTPS and SSL.
Many popular blockchains already use the EVM, including Polygon, Avalanche, Optimism, and of course Ethereum. In fact, I think the EVM will become as well-known as other key internet protocols like HTTPS and SSL.
In order to truly appreciate the EVM, we first need to cover a few basics.
A transaction specifies a change to be made from one state to another.
Transactions are grouped into blocks. Blocks are then chained together, forming a blockchain.
Blocks depend on the previous state, which is determined by the previous block, and so on. Therefore, the blockchain is a sequential list of changes (blocks) made to an implicit state. In order to calculate the current state of a blockchain, you need to consider every block starting with the genesis (first) block. A more technical guide to how this works is
One of web3’s founding principles is to increase trust in the systems we use.
First, consider a centralized system. In this case, a single entity has complete control over the state of the system. If someone were to ask this entity what the state was, the entity could respond with anything it wanted. This
Every institution that distributes power, money or status eventually falls to bias and corruption. Centralized internet platforms are no exception. It's fundamentally self-interested human behavior playing out at scale: a feature, not a bug.
In a decentralized system, the state of the system is determined by a collection of nodes that come to a consensus over the correct state of the blockchain. If someone asks for the state, the response is whatever the majority of nodes believe to be correct.
A decentralized system shifts power away from a single entity and ensures a few bad actors can’t compromise the integrity of an entire system. This increases the trust that users have in the system.
I mentioned earlier that smart contracts are powerful because they enable developers to create
Smart contract applications include financial purposes, gaming, healthcare, and real estate; and they can even be used to configure entire corporate structures.
However, we haven’t covered how a smart contract actually runs on the blockchain.
Enter the EVM.
The Ethereum Virtual Machine is the runtime environment for smart contracts in Ethereum.
In plain language, smart contracts are called by a transaction. The EVM helps nodes determine the output of a smart contract. This output represents a state change, and the EVM “tells” the node this output so that the node can update its state.
Here’s a step-by-step breakdown of this all works:
If you’re math-inclined, the specification for how the EVM works is defined in the
What matters is that nodes are running an EVM that is compatible with everybody else’s EVM. Two nodes running the same smart contract at the same time should get the same output. The deterministic nature of the EVM is what makes the underlying consensus work!
It’s difficult to make a one-size-fits-all solution for any problem. Blockchains are no different, and many are built with specific use cases in mind. However, it would be a waste of time for developers to constantly rewrite their smart contracts for every new blockchain that was introduced. To fix this, many blockchains are designed to be EVM Compatible.
A blockchain protocol is EVM Compatible if its smart contracts can run on the Ethereum Virtual Machine.
The EVM enables developers to write blockchain-agnostic smart contracts, which ultimately increases the productivity of the entire web3 ecosystem.
For example, Polygon is a popular blockchain that launched as an alternative to Ethereum. Compared to Ethereum, Polygon can handle ~1000x more transactions per second at a fraction of the cost. These stats make using Polygon and Ethereum feel very different. Nevertheless, there is one key similarity: both are EVM compatible.
One of the main reasons for Polygon’s meteoric rise is its EVM compatibility. Paired with minuscule transaction fees, Polygon is an attractive alternative to Ethereum as it takes minimal effort for developers to port over their smart contracts.
In today’s article, we covered:
Blockchain fundamentals: transactions and decentralized systems
How the EVM helps with running transactions
Why EVM compatibility standardizes the developer experience across blockchains
Thanks for reading! I’d love to hear what you think and the future topics you’d like to see. Simply comment below or
Also published here.