What Arbitrum Stylus actually does

Arbitrum Stylus expands the Arbitrum Nitro stack by introducing WebAssembly (WASM) as a first-class execution environment alongside the existing EVM. This dual-execution model allows developers to write smart contracts in high-performance languages like Rust, C, and C++, while maintaining full compatibility with Solidity. The result is a hybrid ecosystem where teams can leverage WASM’s speed for compute-intensive tasks without sacrificing the security guarantees provided by Ethereum’s fraud proofs.

The core distinction lies in the execution model. The EVM uses a stack-based architecture with a limited instruction set, prioritizing uniformity and security across all nodes. WASM, by contrast, is a binary instruction format designed for a stack-based virtual machine that supports a broader range of operations. This enables the use of complex data structures, standard libraries, and advanced algorithms that are cumbersome or inefficient to implement in Solidity. Security remains paramount: Stylus programs are subject to the same fraud proof mechanisms as native EVM contracts, ensuring that any invalid state transition is detected and challenged by the network.

EVM contracts versus Stylus programs

Arbitrum Stylus and the traditional EVM environment offer distinct approaches to smart contract development. While both operate within the same Arbitrum Nitro stack, they differ fundamentally in language support, compilation targets, and execution models. Understanding these differences is essential for developers choosing between established Ethereum compatibility and high-performance alternative runtimes.

Language and Compilation Targets

The most visible difference lies in the programming languages supported. The EVM environment relies on languages that compile to EVM bytecode, primarily Solidity and Yul. These tools have mature ecosystems, extensive libraries, and widespread developer familiarity. Stylus, by contrast, supports languages that compile to WebAssembly (WASM), such as Rust, C, and C++. This allows developers to leverage existing libraries, advanced memory management, and complex data structures that are difficult or inefficient to implement in Solidity.

Execution and Gas Models

Execution models also diverge significantly. EVM contracts execute within the Ethereum Virtual Machine, a stack-based interpreter designed for security and decentralization. Stylus programs run in a WASM runtime, which offers faster execution and lower overhead for compute-intensive tasks. While EVM gas costs are predictable but often high for complex logic, Stylus can optimize gas usage by reducing the number of EVM opcodes required for equivalent operations.

Security and Fraud Proofs

Despite these differences, both environments share the same security guarantees. Arbitrum’s fraud-proof mechanism ensures that any invalid state transition—whether from an EVM contract or a Stylus program—is detected and challenged. This means developers can trust the integrity of their applications without compromising on the decentralized security model that defines the Arbitrum network.

FeatureEVM (Solidity/Yul)Stylus (Rust/C/C++)
LanguageSolidity, YulRust, C, C++
Compilation TargetEVM BytecodeWebAssembly (WASM)
Execution ModelStack-based interpreterWASM runtime
Gas EfficiencyStandard EVM gas costsOptimized for compute-heavy tasks
Security ModelFraud proofsFraud proofs
Library EcosystemSolidity-specific librariesExisting Rust/C/C++ libraries

Performance gains from WASM execution

Arbitrum Stylus shifts the execution environment from Ethereum’s EVM to WebAssembly (WASM). This change matters because the EVM is designed for simplicity and security, not raw computational speed. When you write a smart contract in Solidity, every operation—whether it’s a simple addition or a complex cryptographic hash—must be translated into EVM bytecode. This translation is inherently limited by the EVM’s architecture, which prioritizes uniformity across all nodes. While this ensures decentralization, it creates a bottleneck for DeFi applications that require heavy computation, such as advanced order matching engines or complex financial modeling.

Stylus enables contract development in Rust, C, and C++, languages that compile to WASM. WASM programs run significantly faster than EVM bytecode because they leverage native CPU instructions rather than the EVM’s stack-based virtual machine. This efficiency translates directly into lower gas costs for complex logic. For example, an operation that might cost thousands of gas units in EVM due to iterative loops or large memory accesses can often be executed in a fraction of that cost in Stylus. This reduction in computational overhead enables new DeFi primitives that were previously too expensive to deploy on-chain.

The security model remains intact through Arbitrum’s fraud proofs. Even though the execution environment is different, the validity of every Stylus transaction is still verified by the network. If a node attempts to submit a fraudulent state transition, it can be challenged and proven invalid. This means you get the performance benefits of WASM without compromising the security guarantees that Ethereum developers rely on. The result is a platform where complex financial logic can be executed efficiently, opening the door for more sophisticated decentralized applications.

fraction
of gas cost for complex logic compared to EVM

Security via Nitro fraud proofs

Arbitrum Stylus does not introduce a new trust model; it inherits the security guarantees of the Nitro stack. When you deploy a contract written in Rust or C++, you are not stepping outside the safety net that protects standard EVM contracts. Instead, Stylus leverages Nitro’s fraud-proof system to ensure that non-EVM execution is held to the same rigorous standard.

The core mechanism remains the fraud proof. If a validator observes that a Stylus transaction produced an incorrect state transition, they can submit a fraud proof to the Ethereum mainnet. This proof demonstrates that the WASM execution deviated from the expected outcome, allowing the network to roll back the invalid state. This process is identical to how EVM fraud proofs work, ensuring that the underlying security assumption—Ethereum’s finality—remains intact.

This parity is critical for DeFi builders. It means that the speed and efficiency gains from using lower-level languages do not come at the cost of security. Whether the contract logic is compiled to EVM bytecode or WASM, the challenge period and dispute resolution mechanisms function uniformly. Developers can focus on optimizing performance without worrying about introducing new attack vectors or trust assumptions into their protocols.

The consistency of this security layer simplifies auditing and risk assessment. Security teams can apply the same verification logic to Stylus contracts as they do to Solidity contracts, relying on the proven robustness of Nitro’s fraud-proof infrastructure. This alignment ensures that Stylus integrates seamlessly into the existing Ethereum security ecosystem, providing a familiar safety net for high-value DeFi operations.

When to choose Stylus over Solidity

Stylus is not a replacement for Solidity; it is a specialized tool for specific performance bottlenecks. The primary advantage of Rust and C++ in Stylus is execution speed, enabled by WASM compilation rather than EVM bytecode interpretation. This difference matters most when your application logic involves heavy computation, complex cryptography, or large-scale data processing.

If your DeFi protocol requires frequent, low-latency calculations—such as real-time price oracles, complex derivatives pricing, or on-chain gaming logic—Stylus provides a significant edge. The ability to use mature, high-performance libraries in Rust or C++ allows developers to write efficient code that would be prohibitively expensive or slow in Solidity. However, this comes with a trade-off: you lose access to the vast ecosystem of pre-built Solidity libraries and the immediate familiarity of the EVM environment.

FeatureSolidity (EVM)Stylus (WASM)
Execution SpeedStandardHigh
Library EcosystemExtensiveGrowing
Developer Talent PoolFocusedBroad
Security ModelFraud ProofsFraud Proofs

Despite the language shift, security remains anchored in Arbitrum’s fraud proof system. Both Solidity and Stylus contracts are subject to the same rigorous verification process, ensuring that the choice of language does not compromise the integrity of the network. Choose Stylus when performance is the critical constraint and you have the developer expertise to leverage it effectively.

Frequently asked questions about Stylus

What is Arbitrum Stylus?

Arbitrum Stylus allows developers to write smart contracts in Rust, C, and C++ instead of Solidity. These programs compile to WebAssembly (WASM), running alongside the existing EVM on Arbitrum chains. This setup gives developers access to Rust’s performance and memory safety while keeping full compatibility with Ethereum infrastructure.

How does Stylus differ from the EVM?

The EVM uses EVM bytecode, which is interpreted by the Ethereum Virtual Machine. Stylus uses WASM bytecode, which is executed by a separate, lightweight runtime. While both run on Arbitrum, WASM offers faster execution speeds and access to native system libraries, making it better suited for compute-heavy DeFi logic.

Is Arbitrum a Layer 1 or Layer 2?

Arbitrum is primarily a Layer 2 (L2) scaling solution that settles transactions on Ethereum. However, the Arbitrum Nitro stack also supports Layer 3 (L3) chains, which can settle on any Ethereum L2, including Arbitrum One. This flexibility allows builders to choose their settlement layer based on security and cost needs.

Who owns Arbitrum?

Arbitrum was founded by Ed Felten, Steven Goldfeder, and Harry Kalodner, who met while at Princeton University. The technology is developed and maintained by Offchain Labs, the company behind the Arbitrum protocol. The network is governed by the ARB token holders through decentralized governance mechanisms.