dYdX logo
dYdX logodYdX icon
English
中文
日本語
한국어
русский
Türkçe
Français
Português
Español
Powered bydYdXchain
Follow us on

What Is the EVM, and How Does It Work?

dYdX
dYdX
EVM
dYdX
dYdX

Bitcoin (BTC) inaugurated the cryptocurrency revolution, but Ethereum (ETH) introduced greater complexity and versatility to the decentralized web. Instead of solely focusing on transferring value on peer-to-peer (P2P) networks, Ethereum's team envisioned a permissionless version of the internet where decentralized apps (dApps) run on blockchains rather than centrally controlled servers. 

To achieve Ethereum's dream of a decentralized online experience, programmers built a revolutionary software called the Ethereum Virtual Machine (EVM) to power their pioneering protocol. With the EVM, third-party developers can create diverse and dynamic decentralized online services, and users can enjoy a radical new way of interacting with the web. 

In this guide, we’ll discuss what the EVM is, how it contributes to the rise of Web3, and its pros and cons.

What is the Ethereum Virtual Machine (EVM)?

The EVM is Ethereum's foundational software infrastructure that broadcasts, interprets, and compiles transaction data throughout the network. Unlike prior crypto blockchains, however, the EVM comes pre-built with the ability to recognize and process nuanced automated commands called smart contracts. This smart contract functionality makes Ethereum's virtual machine similar to a cloud-based supercomputer that constantly recognizes and reorganizes the current status (or state) of all ETH-based applications. 

Sometimes, crypto enthusiasts refer to the EVM as Ethereum’s brain or central nervous system since all the activity on the blockchain has to pass through the EVM. The nodes on the EVM track all interactions throughout Ethereum's ecosystem and constantly refresh the latest account details according to Ethereum's coding instructions. 

What's the purpose of the EVM?

The EVM serves as the base layer for an experimental and decentralized version of the internet colloquially called Web3. This protocol’s sandboxed design gives third-party programmers the flexibility and security to deploy dApps with a limitless range of advanced functions, including decentralized finance (DeFi) trading, play-to-earn games, or non-fungible tokens (NFTs). 

Since EVM dApps run on blockchain technology rather than centralized servers, they offer web users unique value propositions such as custody over their digital assets in self-custodial wallets, P2P transactions, and decentralized governance. 

Beyond decentralizing digital applications, the EVM is a vital hub in the growing Web3 ecosystem. Since Ethereum is the oldest smart contract blockchain and has a solid developer community, many crypto projects leverage the EVM to make it seamless to port dApps on multiple networks. For example, the Arbitrum (ARB), Avalanche (AVAX), and Polygon (MATIC) blockchains are EVM-compatible, meaning they synchronize with Ethereum's blockchain and give traders greater accessibility to decentralized services. 

As the EVM becomes the gold standard for processing smart contract code, it streamlines communication between different cryptocurrency networks, making Web3 more user-friendly, accessible, and interconnected. 

How does the EVM work?

Although the EVM understands multiple programming languages, developers often use Vyper or Solidity to write smart contracts for their dApps and submit them for processing. Once programmers are ready to deploy their EVM smart contracts, they run them through a compiler, which transforms the high-level, human-readable languages like Solidity into machine-friendly 1s and 0s (aka bytecode) and stores this information on the Ethereum blockchain. 

The EVM knows when and what actions to perform––thanks to a set of short, predefined commands, called opcodes, written into each dApp's programming. When nodes on the EVM recognize a state change corresponding to a smart contract’s conditions, it automatically fulfills the actions associated with each opcode in a step-by-step order while recording this data on the distributed payment ledger. 

The machine also has gas fees, which developers and traders pay in ETH to cover the energy required for each opcode. These fees fluctuate depending on network demand and the smart contract's complexity, and they go to Ethereum's node operators as an incentive for good behavior.

Pros and cons of the EVM

Thanks to its seamless support of smart contract applications, the EVM opened exciting new possibilities for blockchain—but not everything about this revolutionary software is perfect. Although core developers continue to perfect the EVM's features, there are criticisms over its efficiency and scalability.

EVM pros  

High security standards

Smart contracts on the EVM enjoy the Ethereum blockchain's vast community and a strong reputation for security. The EVM's history and design elements, like contract immutability and transparent payment ledgers, make it a secure environment for executing dApps and handling P2P digital assets. Additionally, the EVM's gas fee model protects against infinite loops, reducing the risk of distributed denial-of-service (DDoS) attacks.

Large developer pool

Ethereum's developer community often ranks as one of the largest in cryptocurrency, with thousands of global contributors working on the EVM. This vast pool of developer talent promotes innovation and constant improvement in the EVM, simplifying the process of building applications due to the vast array of tools, shared knowledge, and resources. 

Increased flexibility and interoperability

The EVM is a Turing-complete system, meaning it has the versatility to perform any computation on a conventional computer. Developers relying on the EVM can also use one of the multiple programming languages to build their dApps and deploy them on numerous EVM blockchains. The flexibility and interoperability of the EVM make it simple for blockchain developers to design their ideal protocols and port them throughout Web3.

Robust user base

After Bitcoin, Ethereum is the second-largest cryptocurrency by market cap, and it often holds the majority of locked funds in Web3 fields like DeFi. Despite low fees on competing smart contract networks, many developers still gravitate toward the EVM to take advantage of its established user base and visibility.

EVM cons

More network congestion

The EVM's sequential processing system sometimes leads to bottlenecks, especially during times of heightened congestion. For example, when NFT game CryptoKitties took Ethereum by storm in 2017, the EVM couldn't process billions of requests fast enough to keep pace with user demand. Even during normal network operations, the average time for transaction processing on the Ethereum blockchain is around 14 minutes

High EVM crypto gas fees

A related scalability challenge for the EVM is its higher gas fees than many competing blockchains. During extreme demand, the fees for using dApps or deploying smart contracts reach prohibitively high levels. Complaints over Ethereum’s gas fees contributed to a rise in competing smart contract blockchains and lower-fee EVM-compatible alternatives.

Still prone to coding errors

While the EVM provides a secure sandboxed environment for developing dApps and executing smart contracts, it doesn't have internal auditing systems to prevent code vulnerabilities, glitches, or bugs. Third-party audits help prevent mistakes, but it's possible for weak coding instructions to introduce severe security concerns to EVM-based protocols. 

Eligible traders can trade ETH perpetuals on dYdX 

Given Ethereum's size and influence in the cryptocurrency sector, it's no surprise ETH regularly ranks as one of the most actively traded digital assets. For eligible traders interested in adding ETH to their portfolios, dYdX offers Ethereum perpetual contracts on our decentralized trading platform. Eligible traders on dYdX enjoy deep liquidity when placing trades, as well as advanced order types, slippage tolerance controls, and leverage. For more details on dYdX's latest offerings and features, check out our official blog. And don’t forget that dYdX also offers more free Web3 educational resources on dYdX Academy. Eligible traders can head to dYdX and start trading on our exchange today. 

Disclosures

The content of this article (the “Article”) is provided for general informational purposes only. Reference to any specific strategy, technique, product, service, or entity does not constitute an endorsement or recommendation by dYdX Trading Inc., or any affiliate, agent, or representative thereof (“dYdX”). Use of strategies, techniques, products or services referenced in this Article may involve material risks, including the risk of financial losses arising from the volatility, operational loss, or nonconsensual liquidation of digital assets.  The content of this Article does not constitute, and should not be considered, construed, or relied upon as, financial advice, legal advice, tax advice, investment advice, or advice of any other nature; and the content of this Article is not an offer, solicitation or call to action to make any investment, or purchase any crypto asset, of any kind.  dYdX makes no representation, assurance or guarantee as to the accuracy, completeness, timeliness, suitability, or validity of any information in this Article or any third-party website that may be linked to it.  You are solely responsible for conducting independent research, performing due diligence, and/or seeking advice from a professional advisor prior to taking any financial, tax, legal, or investment action.

You may only use the dYdX Services in compliance with the dYdX Terms of Use available here, including the geographic restrictions therein.

Any applicable sponsorship in connection with this Article will be disclosed, and any reference to a sponsor in this Article is for disclosure purposes, or informational in nature, and in any event is not a call to action to make an investment, acquire a service or product, or purchase crypto assets.  This Article does not offer the purchase or sale of any financial instruments or related services.

By accessing this Article and taking any action in connection with the information contained in this Article, you agree that dYdX is not responsible, directly or indirectly, for any errors, omissions, or delays related to this Article, or any damage, injury, or loss incurred in connection with use of or reliance on the content of this Article, including any specific strategy, technique, product, service, or entity that may be referenced in the Article.