{"id":78493,"date":"2023-06-21T09:50:11","date_gmt":"2023-06-21T09:50:11","guid":{"rendered":"https:\/\/www.techopedia.com\/?post_type=definition&p=78493"},"modified":"2023-11-21T19:17:00","modified_gmt":"2023-11-21T19:17:00","slug":"ethereum-virtual-machine-evm","status":"publish","type":"definition","link":"https:\/\/www.techopedia.com\/definition\/ethereum-virtual-machine-evm","title":{"rendered":"Ethereum Virtual Machine (EVM)"},"content":{"rendered":"

What Is Ethereum Virtual Machine (EVM)?<\/span><\/h2>\n

Ethereum Virtual Machine (EVM) is a software<\/a> that sets the rules of computing the state of the Ethereum<\/a> network from block to block. The EVM is a core part of Ethereum as it executes smart contracts<\/a>, processes transactions, and updates account balances.<\/span><\/p>\n

In simple words, EVM is a virtual machine<\/a> or a cloud computer<\/a> that powers the Ethereum protocol. Just like a computer, it executes code and has memory to save information. However, EVM is not just a single computer but a pool of thousands of cloud machines around the world.<\/span><\/p>\n

\n\n\n\n\n\n
\n

EVM’s Key Functions<\/b><\/p>\n<\/td>\n<\/tr>\n

\n

Managing the state of the Ethereum blockchain<\/span><\/p>\n<\/td>\n

\n

Executing smart contracts<\/span><\/p>\n<\/td>\n<\/tr>\n

Storing data<\/span><\/td>\n\n

Calculating gas fees<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n

How Does the EVM Work?<\/span><\/h2>\n

Developers on Ethereum write their smart contract code in a programming language called Solidity. The code is then translated to byte code so that the EVM can read the instructions.\u00a0<\/span><\/p>\n

In the process of translating the code from Solidity to byte code, the instructions are first broken down into \u2018opcodes\u2019 or operation codes. Every line of code is converted to opcodes so that the EVM knows exactly how to execute a transaction.<\/span><\/p>\n

As we know, every transaction on Ethereum requires a gas fee<\/a> to be executed. Therefore, the relationship between opcodes and gas fees is also important in understanding how the EVM works.<\/span><\/p>\n

In theory, when you are paying gas fees, you are actually paying for the opcodes to be executed by the EVM. The more opcodes there are, the higher your gas fees will be. <\/span><\/p>\n

Simple transactions like sending ETH from one account to another will require less gas compared to complex processes like creating a smart contract, as the EVM is required to do more work.<\/div><\/div>\n

EVM’s Key Features<\/span><\/h2>\n