What are the challenges of applying WASM in the Web3 field, and why did Ethereum ultimately choose EVM?

Recommended Reading
2023-10-10 15:30:35
Collection
Wasm allows developers to write high-performance code in languages such as Rust, Go, C, and C++. In the Web3 world, Wasm has been adopted by blockchain projects like Cosmos, NEAR, and Polkadot. Ethereum considered adopting Wasm but decided to stick with EVM execution.

Title: 《The History of Wasm in Blockchain

Author: krinza.eth & Dino, Fluent Labs

Compiled by: 登链翻译小组

The Origins of Wasm

Since 1989, the Web has come a long way. From the initial simple static pages to a world of full applications supporting billions of users.

Because Web "applications" needed to interact dynamically with elements in HTML documents, JavaScript was introduced. It became widely popular and was once the only programming language used in browsers.

JavaScript is useful as a standard language, but it also has limitations. What if some developers do not understand JavaScript? What if JavaScript is not the best language for certain use cases?

Thus, WebAssembly was born: a low-level, portable, binary format and a compilation target for high-level programming languages. It is efficient, secure, and flexible.

The introduction of WebAssembly (Wasm) meant that JavaScript no longer needed to be the only language of the Web. Developers can write high-performance code in languages such as Rust, Go, C, and C++, and compile it into Wasm modules to run in the browser. This opened up new possibilities for high-performance web applications (such as 3D graphics, video editing, gaming, etc.).

The Popularity of Wasm in Web2

The story of Wasm did not end in the browser. Over time, it broke free from its initial goals and began powering some of the world's most complex distributed applications.

Here are some ways Wasm is being applied:

E-commerce and Backend Optimization:

  1. Shopify: Uses Wasm to optimize backend operations for speed and efficiency.

Design and Collaboration Tools:

  1. Figma: Transitioned from asm.js to WebAssembly, resulting in a threefold performance improvement.
  2. AutoCAD Migration: Similar to Figma, AutoCAD adopted Wasm to address complex Windows OS dependency issues.

Multimedia and Entertainment:

  1. Netflix: Utilizes Wasm technology to create immersive video interactions, enhancing user engagement and entertainment experience.

Software Development and Tools:

  1. Adobe: Invests heavily in WebAssembly, expanding software development possibilities in the browser environment.
  2. Microsoft: Integrates Wasm into Azure Functions, Visual Studio Code, and Edge, shaping modern development tools.

Gaming and Interactive Experiences:

  1. Unity: Uses Wasm technology to build high-performance cross-platform games.
  2. Pinterest: Leverages Wasm technology to create dynamic user experiences.

Infrastructure and Fintech:

  1. Fastly/Cloudflare: Adopts Wasm technology to enhance network performance and optimize content delivery.
  2. Visa: Uses Wasm technology to ensure secure payment processing and protect sensitive user data.

Wasm technology has driven innovation across many fields. Its impact in e-commerce, entertainment, software development, gaming, web, and critical systems is undoubtedly revolutionary.

The Popularity of Wasm in Web3

Fast forward to Web3, and Wasm has also become very popular. Over the past five years, it has become the execution environment for many top blockchain projects. Here are some notable examples:

WASM

WASM

WASM

The popularity of Wasm in Web3 is not much different from that in Web2. Efficiency, standardization, security, and flexibility of programming languages are the reasons for its popularity. Here’s a statement from Andreas Rossberg, the then-technical lead at Dfinity (also a co-creator of Wasm), in the vision of the Internet Computer:

"Our vision is that developers can program on the Internet Computer using any language they like."

Support for general-purpose programming languages not only provides a more intuitive experience for Web3 native developers but also allows millions of new developers to build on-chain applications. The aforementioned projects (and others like Tezos, EOS, etc.) see Wasm execution as a powerful idea.

Challenges of Wasm in Web3

But why aren’t millions of developers building applications on-chain? Why haven’t we achieved mass adoption yet? Hold on - let’s not talk about mass adoption yet - why isn’t Wasm even the most popular execution environment in our still very niche Web3 world?

No one has articulated the crux of the issue better than Sreeram Kannan of EigenLayer. Historically, to innovate on an execution environment (and any other core infrastructure), you must launch a decentralized trust network. You must acquire a set of validators, and you must secure a significant commitment of funds.

This is incredibly difficult to sustain. Launching a truly decentralized and permissionless trust network (without relying on venture capital or subsidizing those looking to profit easily) is akin to starting a revolution, requiring skills very different from engineering distributed systems.

"Creating a decentralized trust network is like finding a unicorn." --- Sreeram Kannan

The fact is, very few blockchain projects - even those with impressive technological innovations - have been able to launch a sustainable trust network. It can be argued that only two blockchains have done so to date: Bitcoin and Ethereum. This makes it difficult for new execution environments like Wasm to achieve escape velocity.

Ethereum's Wasm Experiment

A natural question arises: "If Wasm execution is so desirable, why haven’t Bitcoin and Ethereum adopted it?"

For Bitcoin, the answer is simple. Bitcoin's trust network offers several key commitments, one of which is "no hard forks." This immediately rules out replacing Bitcoin's limited scripting environment with a more programmable Wasm environment.

For Ethereum, we need to look back at history.

Ethereum-flavored Wasm (Ewasm) was initially proposed in 2015 and considered for years. Specifically, Ewasm is "a restricted subset of Wasm used in Ethereum contracts."

The goals of the Ewasm project include EVM transpilers, virtual machine implementations, embedded meters, and more. To better understand the thinking behind Ewasm, check out the following resources:

So, where is Ewasm now?

The Ethereum Foundation ultimately decided not to adopt Ewasm but to continue using EVM execution. While there are indeed challenges regarding backward compatibility and execution sharding, this decision is part of a broader strategic shift. This shift has been discussed by Vitalik Buterin and Casey Detrio and later formalized as the "Rollup-Centric Ethereum Roadmap."

WASM

A Permissionless Future

Why the shift?

At the time, the Ethereum community did not express it this way, but they recognized the power of modular blockchain architecture and how it enabled permissionless innovation at a higher level of the tech stack. They knew it was a better approach.

WASM

WASM

Back to the present. Ethereum is fully advancing the Rollup-Centric roadmap to achieve trusted neutrality, verifiability, security, and data throughput, while thousands of (Rollup) flowers bloom.

Rather than conducting a single execution sharding experiment, it’s better to allow anyone in the world to customize a Rollup according to their needs, regardless of use case. Some Rollups will use EVM, while others will use Wasm. Some will use fraud proofs, while others will use zero-knowledge proofs. Some will succeed, and some will fail. But they will all be permissionless attempts.

Where Fluent Fits In

At Fluent, our mission is to bring Wasm execution to Ethereum.

We believe the Wasm team has found some ways, and we align closely with Ethereum's values. We think ZK technology opens up a new way to solve problems and that a better developer experience is needed to unlock access to secure block space.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators