Query editor
WITH params AS (SELECT DATE '2026-08-01' start_date,current_date end_date),dates AS (SELECT day FROM params CROSS JOIN UNNEST(sequence(start_date,end_date,interval '1' day)) t(day)),curve_fees AS (SELECT block_date day,sum(CAST(bytearray_to_uint256(bytearray_substring(data,33,32)) AS double))/1e18 creator_fee_native_usdc_18,sum(CAST(bytearray_to_uint256(bytearray_substring(data,65,32)) AS double))/1e18 protocol_fee_native_usdc_18,sum(CAST(bytearray_to_uint256(bytearray_substring(data,97,32)) AS double))/1e18 community_fee_native_usdc_18,sum(CAST(bytearray_to_uint256(bytearray_substring(data,129,32)) AS double))/1e18 trader_rewards_native_usdc_18FROM arc.logs CROSS JOIN params WHERE block_date BETWEEN start_date AND end_dateAND contract_address=0x252bdd768cc44070a84a4b8e86634eae25372571AND topic0=0xcc7e6498356842b6eecbb19e5498fcb206ed052e57d3020c661e8ee822540644 GROUP BY 1),lp_fees AS (SELECT block_date day,sum(CAST(bytearray_to_uint256(bytearray_substring(data,65,32)) AS double))/1e6 creator_fee_erc20_usdc_6,sum(CAST(bytearray_to_uint256(bytearray_substring(data,97,32)) AS double))/1e6 protocol_fee_erc20_usdc_6,sum(CAST(bytearray_to_uint256(bytearray_substring(data,129,32)) AS double))/1e6 community_fee_erc20_usdc_6,sum(CAST(bytearray_to_uint256(bytearray_substring(data,161,32)) AS double))/1e6 trader_rewards_erc20_usdc_6FROM arc.logs CROSS JOIN params WHERE block_date BETWEEN start_date AND end_dateAND contract_address=0x04d6106ceee65a8207da8a77b42a216277530382AND topic0=0x2ecd0efa690c87fe9d622d68980abcf369ffb31905f4f7a8ac0869e5c60f3d95AND varbinary_substring(topic3,13,20)=0x3600000000000000000000000000000000000000 GROUP BY 1)SELECT d.day,'Arc Testnet' network,coalesce(c.creator_fee_native_usdc_18,0) creator_fee_native_usdc_18,coalesce(c.protocol_fee_native_usdc_18,0) protocol_fee_native_usdc_18,coalesce(c.community_fee_native_usdc_18,0) community_fee_native_usdc_18,coalesce(c.trader_rewards_native_usdc_18,0) trader_rewards_native_usdc_18,coalesce(l.creator_fee_erc20_usdc_6,0) creator_lp_fee_erc20_usdc_6,coalesce(l.protocol_fee_erc20_usdc_6,0) protocol_lp_fee_erc20_usdc_6,coalesce(l.community_fee_erc20_usdc_6,0) community_lp_fee_erc20_usdc_6,coalesce(l.trader_rewards_erc20_usdc_6,0) trader_rewards_lp_fee_erc20_usdc_6,'Native and ERC-20 USDC fee series are intentionally separate; testnet units, not USD' noteFROM dates d LEFT JOIN curve_fees c ON c.day=d.day LEFT JOIN lp_fees l ON l.day=d.day ORDER BY d.day