Query editor
with asset as (select 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0 --wstETH), deposit_wsteth as (select "dst" as user, sum(CAST(amount as DOUBLE))/1e18 as wsteth_deposited, count(amount) as cnt_wsteth_depositedfrom compound_v3_ethereum.cWETHv3_evt_SupplyCollateralwhere asset in (select * from asset)group by 1--order by "evt_block_time" desc), withdraw_wsteth as (select "src" as user, sum(CAST(amount as DOUBLE))/1e18 as wsteth_withdrawn, count(amount) as cnt_wsteth_withdrawnfrom compound_v3_ethereum.cWETHv3_evt_WithdrawCollateralwhere asset in (select * from asset)group by 1--order by "evt_block_time" desc), absorbcollateral_wsteth as --liquidations(select "borrower" as user, sum(CAST(collateralAbsorbed as DOUBLE))/1e18 as wsteth_liquidated, count(collateralAbsorbed) as cnt_wsteth_liquidatedfrom compound_v3_ethereum.cWETHv3_evt_AbsorbCollateralwhere asset in (select * from asset)group by 1--order by evt_block_time desc),borrow_weth as(select"src" as user, sum(CAST(amount as DOUBLE))/1e18 as weth_borrowed, count(amount) as cnt_weth_borrowedfrom compound_v3_ethereum.cWETHv3_evt_Withdrawwhere src in (select user from deposit_wsteth)and evt_tx_hash not in (select evt_tx_hash from compound_v3_ethereum.cWETHv3_evt_Transfer where "to" = 0x0000000000000000000000000000000000000000) --borrowing ETH from the pool. NOT NECESSARILY WITH WSTETH COLLATERAL., might use cbETHgroup by 1),repay_weth as(select"dst" as user, sum(CAST(amount as DOUBLE))/1e18 as weth_repaid, count(amount) as cnt_weth_repaidfrom compound_v3_ethereum.cWETHv3_evt_Supply --repays. Includes all repays made by addresses who supplied wstETH at least once, even if now they hold only cbETH collateral.where dst in --list of addresses that have deposited wstETH collateral and borrowed weth(select src from compound_v3_ethereum.cWETHv3_evt_Withdrawwhere src in (select user from deposit_wsteth)and evt_tx_hash not in (select evt_tx_hash from compound_v3_ethereum.cWETHv3_evt_Transfer where "to" = 0x0000000000000000000000000000000000000000) --borrowing ETH from the pool