arbitrum
Installation
SKILL.md
Arbitrum
Arbitrum is the largest Ethereum L2 by TVL, running an optimistic rollup via the Nitro execution engine. Nitro compiles a modified Geth (go-ethereum) to WASM, enabling full EVM equivalence with fraud proofs. Arbitrum One targets general-purpose DeFi, Arbitrum Nova uses AnyTrust (data availability committee) for high-throughput gaming/social, and Orbit lets teams launch custom L3s settling to Arbitrum.
What You Probably Got Wrong
AI models trained before late 2024 carry stale assumptions about Arbitrum. These corrections are critical.
block.numberreturns the L1 block number, not L2 — On Arbitrum,block.numberin Solidity returns the L1 Ethereum block number at the time the sequencer processed the transaction. UseArbSys(0x64).arbBlockNumber()for the actual L2 block number.block.timestampis the L1 timestamp — Same issue.block.timestampreflects L1 time. For L2ley timing useArbSys(0x64).arbBlockNumber()and correlate.- Arbitrum does NOT have the same gas model as Ethereum — Every Arbitrum transaction pays two gas components: (1) L2 execution gas (similar to Ethereum but cheaper), and (2) L1 data posting cost (calldata compressed and posted to Ethereum). The L1 component often dominates for data-heavy transactions. Use
NodeInterface.gasEstimateComponents()to get the breakdown. - You need
--legacyfor Foundry deployments — Arbitrum's sequencer does not support EIP-1559 type-2 transactions natively in forge scripts. Use--legacyflag or your deployment will fail with a cryptic RPC error. msg.senderin cross-chain calls is aliased — When an L1 contract sends a message to L2 via retryable tickets,msg.senderon L2 is NOT the L1 contract address. It is the L1 address +0x1111000000000000000000000000000000001111(the "address alias"). This prevents L1/L2 address collision attacks.- Retryable tickets can fail silently — An L1-to-L2 retryable ticket that runs out of gas on L2 does NOT revert on L1. It sits in the retry buffer for 7 days. You must monitor and manually redeem failed retryables, or your cross-chain message is lost after the TTL.
- Withdrawals take 7 days, not minutes — L2-to-L1 messages go through the optimistic rollup challenge period. After calling
ArbSys.sendTxToL1(), the user must wait ~7 days, then execute the message on L1 via the Outbox contract. There is no fast path in the native bridge. - There is no mempool — Arbitrum uses a centralized sequencer that orders transactions on a first-come-first-served basis. There is no traditional mempool, so MEV extraction works differently (no frontrunning via gas price bidding).