FAQs: Gas
How does gas work on Arbitrum chains?
Fees on Arbitrum chains are collected on L2 in the chains' native currency (ETH on both Arbitrum One and Nova).
A transaction fee is comprised of both an L1 and an L2 component:
The L1 component is meant to compensate the Sequencer for the cost of posting transactions on L1 (but no more). (See L1 Pricing.)
The L2 component covers the cost of operating the L2 chain; it uses Geth for gas calculation and thus behaves nearly identically to L1 Ethereum. One difference is that unlike on Ethereum, Arbitrum chains enforce a gas price floor, currently 0.1 gwei on Arbitrum One and 0.01 gwei on Nova (See Gas).
L2 Gas price adjusts responsively to chain congestion, ala EIP 1559.
Why does it look like two identical transactions consume a different amount of gas?
Calling an Arbitrum node's eth_estimateGas
RPC returns a value sufficient to cover both the L1 and L2 components of the fee for the current gas price; this is the value that, e.g., will appear in users' wallets in the "gas limit" field.
Thus, if the L1 calldata price changes over time, it will appear (in e.g., a wallet) that a transaction's gas limit is changing. In fact, the L2 gas limit isn't changing, merely the total gas required to cover the transaction's L1 + L2 fees.
See 2-D fees for more.
How is the L1 portion of an Arbitrum transaction’s gas fee computed?
The L1 fee that a transaction is required to pay is determined by compressing its data with brotli and multiplying the size of the result (in bytes) by ArbOS’s current call data price; the latter value can be queried via the getPricesInWei
method of the ArbGasInfo
precompile.
Does Arbitrum have a mempool?
The Arbitrum Sequencer orders transactions on a first come, first served basis; the Sequencer inserts transactions into a queue based on the order they are received and executes them accordingly. This queue thus exists in lieu of a mempool. The Sequencer’s queue has no space limit; transactions on the queue will eventually timeout and be discarded if not executed in time. Under normal conditions, the queue is empty, since transactions are executed near-instantaneously.
Do I need to pay a Priority fee for my Arbitrum transactions?
Since transactions are processed in the order that the Sequencer receives them, no priority fee is necessary for Arbitrum transactions; if a transaction does include a priority fee, it will be refunded to the transaction’s origin address at the end of execution.