dmihal / l2-fees

l2-fees.vercel.app
31 stars 16 forks source link

Optimism Security Costs - Missing CTC Submitter #11

Open MSilb7 opened 2 years ago

MSilb7 commented 2 years ago

Optimism 'One Day Security Costs' are only showing costs for the State Commitment Chain (SCC) Submitter, but it is missing fees payed by the Canonical Transaction Chain (CTC) Submitter (i.e. it shows $39k for June 2, 2022 when the actual value is 78.7 ETH ~$143k)

Adding costs paid by Canonical Transaction Chain 0x6887246668a3b87F54DeB3b94Ba47a6f63F32985 submissions would resolve the issue.

Charts for Reference: https://dune.com/optimismpbc/optimism-l1-batch-submission-fees-security-costs

smartcontracts commented 2 years ago

Can confirm that the numbers being shown on the site are off.

Using the adapter we see Optimism is spending 100k:

image

But page only shows 30k:

image

MSilb7 commented 2 years ago

Hi, following up, it seems like this is still not reading to l2fees.info properly.

dmihal commented 2 years ago

Hey @MSilb7 @smartcontracts, sorry for the delay

Here's the CryptoStats adapter that generates this data, I'm guessing some addresses need to be added?

https://cryptostats.community/discover/rollup-l1-fees/rollup-gas-consumed

By the way, we're currently tracking the EOAs, but we'll be switching to tracking the contract addresses itself soon.

smartcontracts commented 2 years ago

@dmihal from what I can tell, the adapter itself looks correct but the data being presented on the site seems off. Sometimes the data is correct, but other times it seems to be excluding one address or the other. Here's an example:

For 2022-06-12 L2Fees shows the following info: 2022-06-17_11-18_1

Checking the adapter for that date (note that the adapter is off-by-one, so when clicking 2022-06-12 it'll do the query for 2022-06-11, which is fine and makes sense), we can see that it matches the expected values: 2022-06-17_11-19_1

Now for 2022-06-11 L2Fees shows:

2022-06-17_11-18

And the adapter shows mismatched values: 2022-06-17_11-19_2

Values for Arbitrum seem to match no matter what.

I noticed that the adapter sometimes returns zero. Is it possible that one of the two address queries returns zero by accident and is therefore sometimes skipped? If the backend for L2fees is caching this value, then that would make sense.