Glossary Background Image

No Bad Questions About Blockchain

Definition of Ethereum virtual machine (EVM)

What is the Ethereum Virtual Machine (EVM)?

The Ethereum Virtual Machine (EVM) is a globally distributed virtual machine at the heart of the Ethereum network that executes smart contracts in it. It helps create safe and efficient contracts and supports the Ethereum ecosystem's development. EVM also serves as a platform for the creation and execution of Decentralized Applications (DApps).

EVM executes all the instructions within a smart contract, during which it gains full access to the blockchain's current state. The EVM consists of the following components:

  • Data store
  • Read-only memory
  • Program counter
  • Gas value
  • Stack
  • Core memory

How does EVM work?

EVM is not an autonomous virtual machine, meaning it only runs when needed and for a short time to execute scripts, or instructions, in the Ethereum blockchain according to the code in the smart contracts, ensuring consistency. It processes smart contracts to exchange money or information, collecting a fee for the gas (computational expense) required for the transaction.

When a user initiates a smart contract through their Ethereum node, it's included in the last block and distributed across the network, where a copy is stored on every other node. Transactions must be completed on every node and included in the previous block along with the results of the smart contract's execution. The nodes update the blockchain's state to reflect the new transactions. There are commissions for transactions that are measured in gas to reflect their computational expense, and they are paid in small amounts of Ethereum. Gas is a unit of work, not a sub-currency, so it can’t be purchased and stored. Users only need to estimate the effort required for it and to have Ethereum in their account. Transactions are typically considered confirmed and irreversible after several blocks have stored the contract. It’s best to wait for at least 5 blocks to do this.

What are EVM's key features?

The EVM features a Turing-complete virtual machine that can solve any problem with the necessary time, energy, and instructions. It also executes code deterministically, ensuring that output will always be consistent with input. To protect smart contracts, EVM operates in isolation from other computer systems and components.

What are the benefits of EVM?

Due to its decentralized structure, EVM's flexibility allows it to boost transparency and efficiency in various industries and sectors, from healthcare to entertainment and in government. DApps have transformed businesses, such as the auction and digital art industry, with secure transactions and added value.

Here are other examples of EVM in business:

  • Prediction and DEX markets

Prediction markets are decentralized exchanges where the objects of trade are various events. Examples of popular DEXs are Uniswap, Curve, Balancer, SushiSwap, DODO, Bancor, and Kyber.

  • Lending in DeFi

Decentralized apps in this category allow users to lend or borrow crypto assets against cryptocurrency collateral without any restrictions, such as background credit checks. Examples include Compound and Aave.

  • Digital art auctions

Decentralized auctions were created with DApps to ensure that each artwork is unique, and that the auction site itself is less exposed to threats and can accurately control the bids to guarantee correct payment. Auctionity or Mintable are good examples.

  • Decentralized autonomous organizations (DAOs)

Decentralized Autonomous Organizations, or DAO, use smart contracts to execute decisions autonomously instead of relying on people and typical hierarchical management structures. Examples include Aragon, Molochdao, DXDAO.

  • Gaming industry

To avoid piracy and add value to game artifacts and assets, smart contracts have been employed to make user identification more reliable. Examples include Alien Worlds and Sorare.

Key Takeaways

  • EVM is a globally distributed virtual machine for executing smart contracts in the Ethereum blockchain.
  • EVM executes scripts, or instructions, in the Ethereum blockchain according to the code in the smart contracts.
  • EVM is the platform used to create decentralized applications or DApps.
  • The commissions for EVM transactions are measured in a unit called gas which is paid in Ethereum.
  • EVM works in isolation to protect smart contracts.

More terms related to Blockchain