Stylus is a significant upgrade slated to occur on Arbitrum testnet later this summer. After Stylus, developers will be able to create Arbitrum smart contracts using Rust, C, and C++ alongside EVM-supported languages like Solidity or Vyper. The L2 will support more languages in the future. The core innovation is allowing WebAssembly (WASM) contracts to run in addition to EVM contracts while maintaining synchronous composability between either type, a feat made possible thanks to Arbitrum’s novel “Nitro” fraud proof technology. After Stylus, programmers can even write one smart contract in multiple languages.
The upgrade is a major unlock allowing developers who may have chosen an alternative L1 to instead build on an Ethereum L2 where there are substantial amounts of users and liquidity. Additionally, some types of smart contracts and subsequent use cases that were not possible will now be attainable, and fees associated with WASM contracts will have a significant reduction versus their Solidity counterparts. Arbitrum will maintain its existing feature set and EVM equivalence; the upgrade creates a second coequal WASM virtual machine and is purely supplementary. Arbitrum is dubbing the dual runtime environment that includes both virtual machines EVM+.
WebAssembly is a binary instruction set used in web browsers such as Google Chrome and Firefox with a highly performant runtime. WASM code can be compiled from Rust, C, C++, and more. Some benefits of WASM are its speed, security, and platform independence, meaning it can run on many types of devices. WASM is more efficient and thus faster than Solidity, which translates to cheaper gas fees.
Arbitrum is not the first blockchain execution environment to utilize WASM smart contracts. EOS, Polkadot, and Cosmos (among others) support the WASM virtual machine and thus contracts coded in many languages that can compile to WASM. Arbitrum will be unique in its dual virtual machine that can process EVM and WASM contracts while maintaining interoperability.
Some tools that are too expensive and difficult to support in the EVM will be realizable after Stylus. For example, implementing many cryptographic functions using Solidity is inadvisable due to the existence of optimized libraries in C and Rust and the prohibitive cost of the Solidity approach. The common solution, adding a new custom precompile to the EVM, has significant drawbacks like the need for a hardfork, unanimous design among client teams, and a long debate around appropriate gas pricing. Stylus offers a solution by allowing these programs to be deployed as standard WASM smart contracts. With Stylus, developers can independently deploy and update their cryptography or other computationally intensive libraries that would need to be custom precompiles in order to be feasible in the EVM.
Some tools required by zk teams, bridges, gaming, AI, social media, and mobile wallets, just to name a few, will become possible to implement. Imagine grabbing an existing reference implementation in C or Rust and easily porting it into a smart contract. Custom precompiles will also benefit Ethereum researchers so they can test new ideas before potentially adding them as precompiles on mainnet.
Matt leads coverage on DEXs, derivatives, governance, and the Avalanche ecosystem. Previously he worked as an Analyst at Ikigai Asset Management and Teller Finance.