EVM (Ethereum Virtual Machine) is one of most supported and universal virtual environments throughout the whole crypto industry. Why is it so special and how can it be outdated in the near future - let’s see. 👀
What is EVM?
EVM (Ethereum Virtual Machine) is a virtual computing environment, that can also be thought of as a decentralised computer, divided into many different nodes, responsible for executing algorithms on the Ethereum network. Those algorithms are usually called smart contracts.
The EVM is considered a Turing-complete machine, which means EVM being capable of theoretically handling any computation that can be done on computers, if there are enough computing resources provided. 💻
The execution of any smart contract is paid using “gas” (gwei), included within the final price of the transaction . ⛽️
More about gas
Gwei acts as an internal currency used as a payment method for transactions carried out on the EVM. 1 gwei is equal to 0.000000001 ETH. Gas for Ethereum is quite similar to automobile fuel for cars, both of which have to be refuelled before use. The reason for refilling is, however, quite different - Ethereum only requires electricity to work properly, why would you create another internal asset then? 🤨
Answering that question, the lack of gas in EVM would probably lead to infinitely complex calculations, possibly bringing the network to a halt due to congestion. Thus, the main function of gas is protecting the net from intruders and attacks on the blockchain. 🛡️
The gas required for each transaction is calculated depending on the complexity of the transaction and the load on the Ethereum network itself. As an example, in mid-2021, after the Shiba Inu meme-coin boomed in popularity, the average Ethereum transaction fee has reached $60, while a swap on Uniswap would cost you $135, and a deposit replenishment in Compound went above $200. The main reason behind that was the high load on the blockchain — a large number of users were making transactions with Shiba Inu in parallel. 🐶
If the operation turns out to be too complicated, the gas limit that was set may not be enough, and the EVM will stop processing the transaction without placing it into the Ethereum blockchain.
Why do we need EVM?
Unlike the Bitcoin protocol, presented as a distributed ledger, Ethereum works as a large data structure, processed and modified by the EVM. Any piece of code written into the Ethereum block will definitely be executed on one of the tens of thousands virtual machines, working independently. ⚙️
The EVM guarantees that all transactions and smart contracts on the Ethereum blockchain will be executed according to the established rules in accordance with the smart contract code. It is the EVM that serves as a platform for performing operations with tokens on the Ethereum network, calling out smart contracts, changing address balances and app conditions. 🔧
The Ethereum virtual machine has some major disadvantages such as relatively high storage costs, low scalability, high gas prices during the network being overloaded, and significant limitations for smart contract programming caused by the security regulations. 🔒
EVM-compatible networks can serve as a solution to these problems. Such nets use a code execution environment quite similar to the Ethereum virtual machine, but providing much cheaper transactions due to unique solutions every project has. Thus, allowing Ethereum decentralized application developers to easily migrate to more scalable blockchains without having to invent new smart contracts. 🙌
Such solutions are often called sidechains. They can use custom separate blockchains with unique consensus algorithms and block creation parameters, while still being based on an EVM-compatible virtual machine. Examples of Ethereum side chains include Matic (Polygon PoS), Gnosis Chain or Loom Network. ⛓️
Another option is second-level solutions (L2) based on Rollups technology. A great example is the Optimism platform. It uses Optimism Rollups protocol with smart contracts in the blockchain being controlled by the EVM. The protocol performs calculations and stores the state of contracts in a separate Optimistic Virtual Machine. 🌈
In July 2022, Vitalik Buterin introduced the new phased plan of the Ethereum blockchain development. One of the main steps right after The Merge was changing the Ethereum Virtual Machine to a completely new virtual machine named the Ethereum WebAssembly (eWASM).
Although there we didn’t get any detail on eWasm yet, the developers claim some significant advantages:
- The speed of smart contract execution being close to native;
- The ability to develop contracts in most popular programming languages, including C, C++ and even Rust (Who would’ve thought 😆);
- Access to one of the biggest blockchain developer communities and a plenty of WebAssembly integrated tools.
EVM has improved the Ethereum net significantly since its launch. However, everything comes to an end and EVM is no exception here. eWasm is surely the next big thing, we are looking forward too, hoping everything goes as planned. Well, considering that is about Ethereum, those aren’t just hopes - we are sure it will be that way. 😉
Stay tuned 📻