Getting Started with Arbitrum Stylus Ben Greenberg @hummusonrails

Hey, there. I’m Ben. Senior DevRel Engineer Online Everywhere at 2

Workshop Objectives 01 02 03 Understand how Stylus extends Solidity with the MultiVM Learn how to deploy Solidity contracts alongside Stylus contracts Explore Solidity<>Stylus interoperability in real dApps 3

You’re already a Web3 dev. You bring Solidity. Stylus brings cheaper memory and compute.

Stylus Fundamentals

Multi-language EVM-compatible WebAssembly MultiVM A new way to write smart contracts in Rust, C/C++, and any Wasm-friendly language Runs alongside the EVM on Arbitrum, not a replacement Leverages WebAssembly for faster, safer, and more flexible execution Stylus runs alongside the EVM with shared state and storage. Arbitrum’s co-equal VM design enables both to access host I/O interchangeably. 6

Why Stylus Exists EVM is limited to 256-bit, high-cost ops leading to higher gas costs and inefficiencies Solidity stays. Stylus brings scalable Wasm. Stylus gives you CPU & memory-efficient Wasm execution, rich type safety and Rust-based tooling 7

Key Concepts in Stylus sol_storage! Mimics Solidity layout but written in Rust #[entrypoint] Defines the root struct of the contract Marks methods that are externally callable #[public] Host I/O Enables calls between Stylus and Solidity contracts MultiVM Runs Wasm and EVM in parallel, shared state tree 8

Solidity + Stylus: Better Together + ✅ Interop between Wasm and EVM on-chain ✅ Shared storage model and state tree ✅ Call Stylus contracts from Solidity and vice versa ✅ Build hybrid dApps with minimal overhead 9

Unified Deployment & Execution Interop: Stylus <> Solidity Stylus enables Wasm execution while keeping compatibility with your Solidity contracts. Contracts can call each other across VMs. 01 02 Flexible Language Support Write high-performance modules in Rust, C, or C++ to extend your Solidity dApp — no rewrite needed. Performance Gains Deploy Solidity and Stylus contracts to the same Arbitrum chain. Offload expensive logic to Stylus for massive gas savings. Shared Tooling and Infra 04 03 Use existing EVM infra (e.g., Foundry, Hardhat) alongside cargo stylus. ArbWasm handles Wasm contract activation under the hood. 10

Stylus Execution Paths ● MultiVM Architecture ○ Both EVM and Wasm execution ○ Select VM based on header ● Interoperable Calls ● Unified Store Access 11

Shared Access Between VMs ● Co-equal VMs share the same host interface ● Shared ABI and host environment ● Consistent behavior across VMs 12

Stylus Deployment Path ● Written in any language that compiles to Wasm ● Compile to Wasm ● Deploy On-Chain ● Activate via ArbWasm 13

What is WebAssembly? ● Portable: Runs the same across devices and operating systems ● Fast: Near-native execution speeds ● Safe: Sandboxed, memory-safe execution ● Language-agnostic: Compile from many languages ● Well-supported: Large and growing developer ecosystem 14

Why Wasm is Ideal Optimized for short, deterministic operations Reduces gas costs for compute-heavy logic Enables safer execution with stricter compile-time checks Supports modern toolchains (like Rust and cargo) 15

What’s Being Built with Stylus x

Stylus Highlights in Production Fairblock Lit Protocol 01 02 Onchain access control: Keys, permissions, and identity Superposition A chain that pays users and devs for onchain activity Onchain decryption: Unlock data only when rules are met CVEX 04 03 Trading platform using Stylus for faster and cheaper transactions 17

x Access Control with Precompiles ● Key generation and derivation ● Signature checks using precompiled cryptography ● Conditional access logic written in Rust ● Controlled decryption only when conditions are met ● Secure verification of signed requests 18

x Policy-Based Decryption ● Onchain keygen, derivation, and cryptographic logic written in Rust ● Efficient signature checks using Stylus for high-perf Wasm execution ● Conditional access and decryption policies encoded in standard Rust ● Real-time decryption now viable within a block’s gas limits ● Enabling private AI, transactions, etc. 19

Real-World Assets Onchain ● Launched US stock and ETF tokens for EU users ● Tokens issued on Arbitrum, bringing real-world assets onchain ● Announced custom Layer 2 blockchain based on Arbitrum, optimized for RWA trading ● New chain will support 24/7 trading, seamless bridging, and self-custody 20

21

What We’re Building

Game of Life ● Conway’s Game of Life is a cellular automaton with simple rules and evolving complexity ● In this workshop, the smart contract simulates the game’s logic ● You’ll implement: ○ Grid setup ○ Step mechanics ○ Read/write state logic ● The Solidity contract becomes the game engine 23

Project Structure ● contracts-solidity/: Your Solidity smart contract lives here. You’ll finish the logic for the Game of Life. ● frontend/: A prebuilt UI to visualize and interact with the contract. You’ll connect it using RPC. 24

Workshop Flow Overview Step Action Details 1 Setup the Workspace Open the repo in GitHub Codespaces Explore the Project Review the contract and frontend existing code Build the Solidity Contract Implement the TBC sections of the contract logic in contracts-solidity/src/NFT.sol Connect to the Frontend Hook up the React app to call the smart contract functions Interact Launch Anvil, deploy contract locally, use UI to interact with the contract 2 3 4 5 25

Are You Ready?

Launch the Codespace https://qr.me-qr.com/oxUGndDq 27

—help • https://docs.arbitrum.io/stylus/stylus-overview • https://github.com/OffchainLabs/awesome-stylus • https://github.com/ArbitrumFoundation/stylus-workshop-gol 28

Want to Stay Informed? @hummusonrails

The Builder’s Block Newsletter @hummusonrails 30

Thank you!