Query editor
with dep_eth as (select date_trunc('hour', block_time) as time, sum(cast(value as double))/1e18 as eth_raw_dep-- , tx_hashfrom arbitrum.traceswhere to = 0x1b0d12879960a768d02bd223ef735d4231a15348and call_type = 'call'and value > cast(0 as uint256)group by 1), xpet_borrow as (select date_trunc('hour', evt_block_time) as time, count(*) as nb_borrowers, sum(cast(value as double))/1e18 as xpet_raw_borrowfrom erc20_arbitrum.evt_Transferwhere "from" = 0x00CBcF7B3d37844e44b888Bc747bDd75FCf4E555group by 1), xpet_repay as (select date_trunc('hour', evt_block_time) as time, count(*) as nb_repayers, - sum(cast(value as double))/1e18 as xpet_raw_repay-- , evt_tx_hashfrom erc20_arbitrum.evt_Transferwhere to = 0x1b0d12879960a768d02bd223ef735d4231a15348group by 1), eth_rec as (select date_trunc('hour',block_time) as time, sum(eth_raw_rec) as eth_raw_recfrom (select block_time, cast(value as double)/1e18 as eth_raw_rec, evt_tx_hashfrom arbitrum.traces as ainner join (select evt_block_time as time, cast(value as double)/1e18 as xpet_raw_repay, evt_tx_hashfrom erc20_arbitrum.evt_Transferwhere to = 0x1b0d12879960a768d02bd223ef735d4231a15348) as b on tx_hash = evt_tx_hashwhere "from" = 0x1b0d12879960a768d02bd223ef735d4231a15348and call_type = 'call'and value > cast(0 as uint256))group by 1), eth_liquidate as (select date_trunc('hour', block_time) as time, count(*) as nb_liquidated, sum(cast(value as double))/1e18 as eth_raw_liquidate-- , tx_hashfrom arbitrum.traceswhere to = 0xfD089cd44862Bb398CF50dEB577FeD9AeCcf016Eand "from" not in (0xd73e6b7c844d8e92e5444ca89dc938a64227751a, 0xfd089cd44862bb398cf50deb577fed9aeccf016e)and call_type = 'call'and value > cast(0 as uint256)group by 1