Query editor
--- post 4844,-- With the arrival of blobs, ArbOS Atlas also introduces significant execution gas fee reductions for Arbitrum One - Phase 2.-- 1️⃣ L1 surplus fee. Reduce the surplus fee per compressed byte from 32 gwei to 0.-- 2️⃣ L2 base fee. Reduce the minimum from 0.1 gwei to 0.01 gwei.-- Arb GAS FEES - l1 calldata + l2 gas (l2 base + l2 surplus)-- gas_used = total gas units used for a tx-- gas_used_for_l1 = gas units used for l1 compoenent (batch posting)-- gas_used-gas_used_for_l1 = gas units used for l2 compoenent-- gas_price : gas price denoted in gwei , 1 gwei = 10^-9 eth--we use the 'effective_gas_price' as the gas price per unit of gas-- explanation of 'effective_gas_price' = it is actual price per unit of gas paid for the transaction.typical 'gas_price' column includes a buffer, 'effective_gas_price' is the actual gas price which tx fee was paid after this excess is refunded-- source: https://dune.com/blog/fueling-gas-spells-arbitrum-- Calculated based on the base fee and the priority fee paid to the miner(priority_fee_per_gas).with daily_l2_fee as (select*,sum(l2_base_eth) over(order by block_date) total_l2_base_eth,sum(l2_surplus_eth) over(order by block_date) total_l2_surplus_eth,sum(l2_rev_eth) over(order by block_date) total_l2_rev_eth--sum(l2_base_eth_test) over(order by block_date) total_l2_base_eth_test,--sum(l2_surplus_eth_test) over(order by block_date) total_l2_surplus_eth_testfrom (selectblock_date,approx_percentile((gas_used * effective_gas_price) / 1e18, 0.5) median_gas_eth_per_tx,avg((gas_used * effective_gas_price) / 1e18) avg_gas_eth_per_tx,sum((gas_used * effective_gas_price) / 1e18) as l2_rev_eth,sum(case when block_time >= cast('2024-03-14 13:48' as timestamp) then (gas_used - gas_used_for_l1) * 1e7 / 1e18 else (gas_used - gas_used_for_l1) * 1e8 / 1e18 end) as l2_base_eth, -- sum(((gas_used - gas_used_for_l1) * 1e8) / 1e18) l2_base_eth, -- gas_used is the gas units consumed by a txsum(case when block_time >= cast('2024-03-14 13:48' as timestamp) then (gas_used - gas_used_for_l1) * (effective_gas_price - 1e7) / 1e18 else (gas_used - gas_used_for_l1) * (effective_gas_price - 1e8) / 1e18 end) as l2_surplus_eth --sum(((gas_used - gas_used_for_l1) * (effective_gas_price - 1e8)) / 1e18) l2_surplus_eth--sum(case when block_time >= cast('2024-03-14 13:48' as timestamp) then (gas_used - gas_used_for_l1) * 1e7 / 1e18 else (gas_used - gas_used_for_l1) * 1e8 / 1e18 end) as l2_base_eth_test, -- sum(((gas_used - gas_used_for_l1) * 1e8) / 1e18) l2_base_eth, -- gas_used is the gas units consumed by a tx--sum(case when block_date >= cast('2024-03-14 13:48' as timestamp) then (gas_used - gas_used_for_l1) * (gas_price - 1e7) / 1e18 else (gas_used - gas_used_for_l1) * (effective_gas_price - 1e8) / 1e18 end) as l2_surplus_eth_test --sum(((gas_used - gas_used_for_l1) * (effective_gas_price - 1e8)) / 1e18) l2_surplus_ethfrom arbitrum.transactionswhere gas_used > 0 and block_number >= 70483338group by block_date)),daily_l1_surplus_fee as (select*,sum(l1_surplus_eth) over(order by block_date) total_l1_surplus_ethfrom (selectblock_date,sum(value) / 1e18 l1_surplus_ethfrom arbitrum.traceswhere "from" = 0xa4b00000000000000000000000000000000000f6and address = 0x2e041280627800801e90e9ac83532fadb6cad99a -- L1 Surplus Feeand value > 0and block_number >= 70483338and success = truegroup by block_date))-- 38817.39304844494 + 960.99 +