Query editor
withtransfer_details as (selectevt_block_time,'deposit' as func,"from" as address,cast(value as int256) / 1e6 as amountfromerc20_arbitrum.evt_transferwhereevt_block_time >= date '2023-12-01'and contract_address = 0xaf88d065e77c8cc2239327c5edb3a432268e5831 -- USDCand "to" = 0x2df1c51e09aecf9cacb7bc98cb1742757f163df7 -- Hyperliquid: Deposit Bridge 2union allselectevt_block_time,'withdraw' as func,"to" as address,(-1) * cast(value as int256) / 1e6 as amountfromerc20_arbitrum.evt_transferwhereevt_block_time >= date '2023-12-01'and contract_address = 0xaf88d065e77c8cc2239327c5edb3a432268e5831 -- USDCand "from" = 0x2df1c51e09aecf9cacb7bc98cb1742757f163df7 -- Hyperliquid: Deposit Bridge 2),first_deposit as (selectfirst_deposit_time as first_deposit_day,count(address) as address_countfrom(selectaddress,min(date_trunc('day', evt_block_time)) as first_deposit_timefromtransfer_detailswherefunc = 'deposit'group by1)group by1),daily as (selectdate_trunc('day', evt_block_time) as block_day,sum(amount) filter(wherefunc = 'deposit') as deposit,coalesce(sum(amount) filter(wherefunc = 'withdraw'),0) as withdraw,sum(amount) as netflow