Ethereum Virtual Machine
Saturday marked the 7th anniversary of the public debut of Ethereum, a blockchain network that on July 30, 2015, mined its first block and started a revolution in the crypto ecosystem. After Bitcoin and its proposal to transfer value between people using cryptocurrencies, Ethereum adapted this technology and created a “distributed global computer” capable of transferring data and running programs in a decentralized way.
Without Ethereum, web3, decentralized finance (DeFi) and non-interchangeable tokens (NFT) would not have the form and power they have today, and many of their technologies and protocols would not exist. One of the main contributions is smart contracts: the way to program the network and all kinds of applications built on its basis is dApps.
These smart contracts are so fundamental to Ethereum that there is even a special tool for them – the Ethereum Virtual Machine, a distributed computing machine. Everything depends on this EVM: the issue of tokens, the creation of NFT and the existence of their marketplaces, dApps, DeFi, blockchain video games, sports tokens and poaps. Every product or service in the ecosystem that depends on smart contracts is provided through the Ethereum virtual machine.
What is an Ethereum Virtual Machine (EVM)?
The Ethereum virtual machine is a computing environment in which smart contracts of this network and millions of dapps created in it are implemented and executed. In other words, this EVM is the largest programming platform in the entire crypto ecosystem.
It is often called a “decentralized computer”, although in fact it is not a device at all, but virtualization or simulation. Virtual machines that already existed outside of Ethereum allow you to create an operational layer over the underlying system or software. This creates an artificial environment that can be used to test or run confidential software in a secure way. All this is extremely important for a decentralized ecosystem, such as blockchain and cryptocurrencies.
How the Ethereum virtual machine works
The Ethereum virtual machine does not have its own hardware, but simulates the operation of a computing center and creates an environment for the development and implementation of software using smart contracts. Hence the computer. And it is called decentralized because it is not a specific machine located in one place, but an emulation accessible from many terminals, which, in turn, supply power to this EVM, like a living mind.
The virtual machine eliminates the need for a giant hangar filled with ultra-high-performance equipment and replaces it with a digital environment to which network users can voluntarily add computing power in exchange for receiving some of the incentives that Ethereum offers. Developers can use it to implement and launch smart contracts that are the basis of their dapps.
What does the Ethereum Virtual Machine Do
The purpose of EVM is to determine and monitor the status of each block in the network. This may sound like a monitoring tool, but it refers to something else: state changes that are indicators or triggers for actions in all kinds of computing systems. For example, when something is turned on or off, activated or deactivated, when something is sent or received, or a file or document is moved, a state change occurs.
These state changes generate modifications in the data structure of computer systems. EVM can check changes in the state of the network and dapps so that Ethereum and the software installed on it work in a decentralized manner, taking into account such moments as network saturation or priorities of operations.
Thus, EVM allows any developer to execute code within an ecosystem in which there is no need to rely on trust in third parties, and where software execution and the result of interaction are guaranteed and predictable.
How the Ethereum Virtual Machine Works
Virtual machines exist outside of Ethereum and are programs that emulate a computer system with its hardware (CPU, memory, data storage unit) and software (operating system, applications, files) software. EVM can run programs, create files and communicate with nodes within the network, but it has its own specific properties.
When a transaction or a corresponding operation occurs in dapp, it triggers the execution of the smart contract. This is where the EVM comes into play, which tracks the state changes necessary to continue working, and enters them into the generated blocks.
The EVM is completely isolated, as an independent part whose code does not work from the network. This allows the software implementation not to interfere with or cause disruptions in the transactional operation of the network or in working with accounts (in this case, Ethereum addresses), and also protects EVM from malicious attacks.
Moreover, the basic Ethereum protocol ensures the continuous, uninterrupted and unchangeable operation of this special machine, which, however, may malfunction because it has an internal regulatory system.
Virtual Machine and the Ethereum Economy
EVM can execute any programs developed in the Solidity programming language compatible with it. But this freedom means that demand is growing as the dapps ecosystem continues to evolve. In order to regulate and determine the priority of the transaction, as well as to prevent the endless execution of the program, EVM registers the costs of implementing and executing smart contracts, which are measured in units of Gas – type fees, as in other blockchain networks.
In Ethereum, Gas is used to “streamline” traffic, and is also part of the network’s reward system. When there is a large operational demand for Ethereum, more gas is charged. If someone wants to get processing priority, they can also pay for more gas. This gas is paid for using ETH, the Ethereum cryptocurrency, which is a variable price token.
These two facts together mean that almost never two identical transactions made at different times will bring the same commission, measured in dollars, which must be taken into account when calculating trading costs.
EVM and Gas on Ethereum
By managing gas fees, EVM consolidates the decentralized economic system of Ethereum with its costs and incentives (for example, the remuneration of miners and the bet on productivity). A gas fee is charged for each operation of the code: the more complex the code, the higher the gas fee.
This fee is charged and used to compensate block validators, in the current proof-of-work system still in use on the Ethereum network. But it also acts as protection or insurance against possible attacks, since operational costs in the event of a massive attack on the network become unavailable.
And not only from a monetary point of view, but also from a technological point of view, there are limits indicating the maximum amount of gas that can be consumed in all transactions contained in a block, which determines how many transactions are included in one block. Currently, the cost is 8 million Gwei per block, which is equivalent to about 380 single transfers of ETH from one direction to another.