Rollup Batch Cost Amortization Calculator
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Rollup Batch Cost Amortization Calculator takes a batch submission transaction hash from a rollup (Optimism, Arbitrum, or any EVM rollup that submits batches to L1) and computes the total cost of that batch, then amortizes it across the number of L2 transactions included. The tool fetches the L1 transaction receipt to obtain gas used and gas price, then combines that with user-provided L2 execution gas data to produce a comprehensive cost breakdown. Results include L1 submission cost, L2 execution cost, total batch cost, and cost per L2 transaction—all displayed in ETH with gas details. This helps rollup users, dApp developers, and infrastructure operators understand the true cost of batch inclusion and optimize batch sizing for cost efficiency.
HOW TO USE
Enter the L1 transaction hash of a rollup batch submission (e.g., from Arbitrum's SequencerBatch or Optimism's StateCommitmentChain). Provide the number of L2 transactions included in that batch, and the total L2 execution gas used across all those transactions. Click "Calculate amortization" to fetch the L1 receipt data from the chain via your connected wallet provider. The tool displays: L1 gas used and price, L2 gas price (estimated from L1 price), L1 cost, L2 cost, total batch cost, cost per transaction, and an amortization efficiency percentage showing how much L1 overhead is distributed per transaction. No wallet connection is required for read-only operation, but connecting allows the tool to use your provider for RPC access.
TECHNICAL MECHANISM: GAS COST DECOMPOSITION WITH ROLLUP-SPECIFIC HEURISTICS
The calculator fetches the L1 transaction receipt via ethers.js, extracting gasUsed (which includes calldata gas for the batch data) and effectiveGasPrice (post-EIP-1559). It calculates L1 cost as gasUsed × effectiveGasPrice. For L2 execution cost, the tool accepts user-provided total L2 gas used and estimates L2 gas price as 10% of the L1 gas price—a heuristic based on observed rollup economics where L2 gas is typically an order of magnitude cheaper than L1. The tool then sums both costs, divides by the transaction count to get per-tx amortized cost, and computes the efficiency ratio (L1 cost / total cost) to show how much of the total is L1 overhead. Unlike block explorers that show raw L1 transaction costs, this tool explicitly models the batch economics and provides actionable metrics for batch optimization. The calculator also displays amortization efficiency—higher percentages indicate better cost distribution across many transactions, helping users identify optimal batch sizes.
WHAT IT CANNOT SEE
Cannot predict future gas prices or batch composition—it only analyzes past or current submitted batches. Cannot account for L1 calldata compression efficiency differences across rollup implementations (e.g., zkSync's compression vs Arbitrum's); it assumes raw calldata gas usage from the receipt. Cannot determine the optimal batch size for a given dApp's transaction patterns without historical data—optimization requires repeated analysis across multiple batches. Cannot include L2 sequencer fees or priority fees in the amortization model without user-provided values; the tool uses a heuristic estimate. Cannot verify that the batch was actually included in the L1 chain or that the provided transaction hashes correspond to valid batch submissions—it trusts user input. Cannot compare across different rollup architectures automatically; each rollup has different submission mechanics (calldata vs blob data, compression schemes). Cannot account for L1 block base fee volatility during the batch submission window; gas price is taken from the actual transaction at submission time.
PLEASE NOTE
EVM chains only. This tool works for rollups that submit batches via L1 transactions (Arbitrum, Optimism, and others). It reads on-chain data but does not write anything. L2 gas price is estimated; for more accurate L2 costs, users should provide actual L2 gas price data if available. No token balances or transfers are read.