Back

Arbitrum Stylus

By
HackQuest
Apr 22, 2024
3 min read

Welcome to the Web3 world, where digital finance and applications are shown in a revolutionary way through the fusion of blockchain technology, cryptocurrencies, and a pioneering spirit. Are you overwhelmed by the wealth of terms in the Web3 world that you don’t understand? Are those slang barriers for you to learn about Web3? Don’t worry! We’re here to explain the obscure terms to guide your learning. Today, we're diving into an exciting development in the world of Ethereum scaling solutions: [Arbitrum Stylus].

image
Preview

Overview

On August 31, 2023, Offchain Labs, the team behind Arbitrum, launched the code and public testnet for Arbitrum Stylus, a new addition to the Arbitrum Nitro technology stack that enhances support for Arbitrum One, Arbitrum Nova, and Arbitrum Orbit chains. This upgrade introduces a new virtual machine, referred to as EVM+, which works alongside the existing Ethereum Virtual Machine (EVM) and mirrors the behavior of EVM contracts as seen on Ethereum.

This additional virtual machine operates on WebAssembly (WASM) instead of traditional EVM bytecode and its capability allows developers proficient in languages like Rust, C, and C++, which can be compiled into WASM, to create blockchain contracts without the need to master Solidity or other blockchain-specific languages.

WASM offers several advantages over Solidity, including more advanced compiler technologies and faster runtime, leading to significantly quicker execution of contracts. In fact, contracts developed in WASM languages are typically ten times more efficient than their Solidity counterparts. The introduction of Stylus significantly broadens Arbitrum's developer base, potentially growing from about 20,000 Solidity developers to millions who are skilled in Rust and C, thereby greatly expanding the potential for innovation and participation in the Arbitrum ecosystem.

image
Preview

Source: Arbitrum Docs

How does Stylus work?

Stylus is a blockchain framework that enables developers to build smart contracts using a variety of programming languages, structured around four key phases: coding, compiling, executing, and verifying.

1.Coding: Developers have the flexibility to use any language compatible with WASM (WebAssembly) for crafting smart contracts. Initially, Stylus will support programming languages like Rust, C, and C++, with Rust providing a comprehensive set of development tools.
2.Compiling: The smart contract code is first transformed from a high-level programming language (such as Rust, C, or C++) into WASM format. This WASM is then converted into native code tailored for specific hardware types using a tool known as ArbWasm.
3.Executing: The resulting program runs within the Wasmer runtime, which is a high-performance environment created specifically for executing WASM. This runtime is designed to efficiently handle WASM files outside of web browsers.
4.Verifying: Typically, the smart contracts execute directly as native code without issues. However, if there's a disagreement among those verifying the contracts, Stylus utilizes the previously mentioned Nitro technology. This involves reformatting the execution history into WASM for thorough verification and resolving disputes on the Ethereum blockchain.
image
Preview

Source: Arbitrum Docs

Conclusion - Why Stylus?

1.Developing on Ethereum Using Popular Programming Languages: Leverage the extensive Arbitrum ecosystem to build applications using well-known WASM-compatible languages such as Rust, C, and C++. This approach integrates widely used internet programming languages with traditional blockchain smart contract languages.
2.Complete Interoperability: Smart contracts written in Solidity and those developed with Stylus are fully interoperable. Developers using Solidity can invoke Rust programs, while those programming in Rust can seamlessly utilize all features of Solidity.
3.Enhanced Speed and Reduced Costs: The use of WASM in Stylus contracts enables computations that are more than ten times faster and results in substantially lower gas costs. Additionally, Stylus significantly reduces memory costs by 100-500 times.
4.Expanding Capabilities: The integration of the mature WASM ecosystem through Stylus unlocks new potential for EVM applications that were previously challenging to implement. For instance, it becomes simpler to migrate existing video games developed in C++ to the blockchain or to utilize computation-heavy AI models.
💡
If you would like to learn more about slang in Web3, let’s explore more in our HackQuest Web3 Glossary and check out our courses on Arbitrum Stylus!
Stay connected with us

More Glossary about ’Arbitrum‘

loading...