Arbitrum's Stylus Architecture Boosts Efficiency With Over 2.3 Million Deployed Contracts
The Arbitrum Stylus architecture has achieved significant efficiency gains after deploying over 2.3 million Rust contracts. This dual-VM environment combines the Ethereum Virtual Machine (EVM) with a WebAssembly (WASM) virtual machine, allowing developers to write code in mainstream languages and compile it to WASM for execution on-chain.
The Stylus architecture provides a more efficient execution environment compared to the EVM, thanks to its use of native 32 and 64-bit operations that align with actual hardware capabilities. This results in faster data processing and reduced costs for compute-heavy workloads. For memory-intensive tasks, the savings are substantial: a 3.8 MB RAM allocation costs only 64 thousand gas on Stylus, compared to 32 million gas on the EVM.
Engineers use Stylus for complex computations such as scoring engines and chess engines, where precise weighted arithmetic is required without floating-point issues. The architecture also enables developers to encode entire chess boards into a single 256-bit integer and execute high-computation tasks that would be prohibited by gas limits in Solidity.
The lifecycle of a program on Stylus involves coding, compilation, activation, execution, and proving. Developers compile their code to WASM and post it on-chain, requiring activation via the ArbWasm precompile. However, this process adds engineering complexity and introduces an additional audit burden for conservative teams.