Arbitrum will be opening up their mainnet in the following weeks, and it would be great to track their fee revenue.
Arbitrum will be slightly harder to track than Optimism. Optimism uses an ERC20 token for ETH, so we can track the transfer events to the fee address. However Arbitrum is more similar to Ethereum mainnet, where ETH is a native asset and not easily indexed.
I messaged Fred from Arbitrum a bit ago, here were his suggestions:
Each transaction receipt includes all the fees paid, you could go through those
Overview of Differences with Ethereum · Offchain Labs Dev Center
This might be our best option, however it requires indexing every transaction, which is very resource intensive.
Another option is to query the ArbStatistics precompile on the L2 to see the total L2 gas consumed so far
https://github.com/OffchainLabs/arb-os/blob/develop/contracts/arbos/builtin/ArbStatistics.sol#L9
This would be a cumulative value. Since Arbitrum doesn’t support “archive nodes”, we wouldn’t be able to query historic events.
Another option is to look at the L1 contracts (ie the delayed bridge and sequencer bridge) to see how much gas was consumed in those.
https://etherscan.io/address/0x011b6e24ffb0b5f5fcc564cf4183c5bbbc96d515
https://etherscan.io/address/0x4c6f947ae67f572afa4ae0730947de7c874f95ef
I believe the main issue with this is that there would be a delay between the fee being paid and the fee being relayed on mainnet. But I may be wrong about this (maybe we can index transactions directly on L1?)