Arbitrum Fee Revenue

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?)

I appreciate the work you put in David to getting this right!

I think one other possible solution, and perhaps even likely over the mid term as the ecosystem evolves, is this:

As Arbitrum looks set to be one of the larger “universal” L2 protocols on Ethereum, it seems that other blockchain data analytics entities (centralized companies or decentralized outfits run by a DAO?) would likely choose to run the indexing task suggested by Fred from Arbitrum.

In the grand scheme of economic incentives, it just seems that some “business” will want to have that data and other info they’ll get from indexing–it will be compatible with their business model and various services they sell.

Then, for low-daily usage of a single stat that falls out of that analysis, it seems they would conceivably allow CryptoStats to use that one number in return for a credit and a link to their more complete analytics service offering.

But I realize that my brief foray into the world of “industrial organization”, a subfield of econ, doesn’t get you what you want right at the start of Arbitrum on mainnet. :frowning:

Hey @0x711, thanks for your input on this! I’m still trying to wrap my head around what you’re describing, are you basically saying that CryptoStats could use the data provided by a 3rd party indexer?

The good news is that I was able to create a subgraph to index total gas consumed. Arbitrum does now support Archive nodes, they’re just really slow for archive calls.

The site is currently using the dmihal/arbitrum-fees-preindex subgraph, which has indexed the last month of fee data, although we’ll switch to the dmihal/arbitrum-fees subgraph once it finishes indexing.

You can see the data live at Arbitrum One - CryptoFees.info :slight_smile:

1 Like

Yeah, that’s basically it.

But perhaps I don’t understand existing standards or methodologies of CryptoStats very well.

I was just thinking that if the overhead of indexing Arbitrum was too much to keep up with for the CryptoStats project, then perhaps other indexers and data sources will emerge in the ecosphere that CS might be able to use.