What is Arbitrum? A Comprehensive Guide to Ethereum’s Layer 2 Solution
Overview of Arbitrum
Arbitrum is a Layer 2 scaling solution designed to address the scalability issues faced by Ethereum. On the Ethereum network, when a transaction is executed via smart contracts, a fee is charged to reward the network participants that store and validate these contracts. As the number of transactions and users grows, transaction fees increase. Additionally, miners in the Ethereum blockchain must simulate every step of a contract’s execution, which is expensive and limits the network’s scalability. Furthermore, contract codes and data are publicly visible unless a privacy overlay is used, which adds additional costs.
Arbitrum aims to reduce network congestion and lower transaction fees by offloading the computational work and data storage from Ethereum’s main network (Layer 1, or L1) to a secondary network (Layer 2, or L2). This solution is provided by Offchain Labs, a company co-founded in 2018 by Ed Felten, a professor at Princeton University. Arbitrum’s approach to scaling Ethereum involves storing data off-chain while leveraging Ethereum’s security to improve scalability.
How Arbitrum Works
The Arbitrum ecosystem involves four primary components: verifiers, a virtual machine (VM), a key, and a manager. These components work together to ensure the smooth execution of transactions within the Arbitrum network.
Arbitrum runs on a straightforward cryptocurrency framework, allowing participants to execute smart contracts on the Arbitrum Virtual Machine (AVM) according to the contract’s rules. The VM’s creator appoints a set of managers to monitor its execution, ensuring compliance with the specified code. Through the Arbitrum protocol, any honest manager can verify the VM’s functionality.
Instead of requiring each validator to replicate every VM execution, Arbitrum reduces costs by allowing the VM’s state to be progressed more cheaply by the managers. Verifiers only need to monitor the hash of the VM’s state, rather than the full state. Arbitrum incentivizes managers to come to an agreement on the VM’s behavior, and changes to the state are accepted only when all managers agree.
In contrast to Ethereum, where every validator monitors the entire network’s applications, validators in Arbitrum only oversee specific decentralized applications (DApps), allowing for less interconnection between nodes and faster transaction processing.
Layer 2 Solutions on Ethereum
What is Layer 2?
Layer 2 refers to scaling solutions that operate on top of Ethereum’s base layer (Layer 1, L1). These solutions handle transactions off-chain while benefiting from the decentralized security of Ethereum’s main blockchain. Essentially, Layer 2 is a supplementary blockchain designed to extend Ethereum’s functionality.
Popular Layer 2 solutions include Optimistic Rollups and Zero-Knowledge (zk) Rollups. Rollups aggregate multiple transactions into a single transaction on Ethereum’s Layer 1. This reduces the overall cost for each user since the L1 transaction fee is distributed among many participants.
How Rollups Work
Rollup process. Source: ethereum.org
In the rollup process, transaction data is submitted to Layer 1, but the execution happens separately in the rollup. By doing this, rollups inherit Ethereum’s security because altering a rollup transaction would require altering the Ethereum blockchain itself. The two main types of rollups are Optimistic Rollups and zk-Rollups, each with different methods of submitting transaction data to Layer 1.
Gas Fees on Arbitrum
Arbitrum uses ArbGas to measure the cost of executing transactions within the Arbitrum network. Each operation within the Arbitrum Virtual Machine (AVM) incurs an ArbGas fee, which is comparable to Ethereum’s gas fees. However, Arbitrum does not impose a strict ArbGas limit like Ethereum does, making it more cost-efficient.
ArbGas is also used to check the validity of instructions and ensure that the EthBridge does not exceed Ethereum’s L1 gas limits. This helps prevent the rollup chain from processing transactions too quickly, which could lead to inefficiencies or errors. Unlike Ethereum gas, which is applied to miners, ArbGas is used to estimate emulation time and throughput for the rollup chain.
One key difference between ArbGas and Ethereum gas is that ArbGas is focused on estimating the emulation of transactions on the AVM, whereas Ethereum gas is focused on transaction execution within the Ethereum network itself.
Arbitrum Ecosystem
Arbitrum has become Ethereum’s leading Layer 2 ecosystem, hosting 888 projects across five key categories: DeFi, Bridges & On-ramps, Gaming, NFTs, and Infrastructure & Tools. The Arbitrum ecosystem provides a wide range of services, from decentralized finance (DeFi) protocols to non-fungible token (NFT) platforms, offering developers a robust environment for building and deploying applications.
Arbitrum’s DeFi. Source: Arbitrum
Arbitrum’s Bridge and On-ramps. Source: Arbitrum
Arbitrum’s NFTs. Source: Arbitrum
Arbitrum’s Infras & Tools. Source: Arbitrum
Running a DApp on Arbitrum
To deploy a decentralized application (DApp) on Arbitrum, developers need several tools, including the Arbitrum compiler, EthBridge, and a validator implementation. These tools are open-source and accessible via GitHub from Offchain Labs.
The deployment process begins with using the Arbitrum compiler to compile Solidity contracts, creating an Arbitrum Virtual Machine (AVM). The next step is selecting a group of validators to oversee the VM’s execution. Validators are chosen by the VM creator and are responsible for ensuring the correctness of the smart contract’s execution. Observers can be appointed to monitor the VM’s activities without being responsible for validating them.
Arbitrum provides an AnyTrust Guarantee, ensuring that the VM will function correctly as long as at least one validator is online and acting honestly. Once the VM is set up, the EthBridge is used to manage the VM’s deployment on Arbitrum and identify the validators who will oversee its operation. Users can then access the DApp’s front-end interface via their browsers, and interact with the VM through validators.
Arbitrum vs. Optimism
Arbitrum and Optimism are both Layer 2 solutions that operate under similar principles but with distinct differences. Both solutions activate only when faulty blocks are detected, rather than with each individual transaction, and both feature cross-chain bridges for token transfers between Layer 1 and Layer 2.
Key differences between Arbitrum and Optimism include:
In summary, while both Arbitrum and Optimism aim to improve Ethereum’s scalability, their differences in fraud-proof mechanisms, performance, and supported programming languages make them suitable for different use cases within the Ethereum ecosystem.