Query editor
with withdraws as (select address, sum("withdraw amount") as "withdraw amount"from (select address, case when mode = 'deposit' then -1.0 else 1.0 end * amount as "withdraw amount"from dune.infinifi.result_infinifi_transactionswhere mode in ('deposit','withdraw') and block_time >= timestamp '2026-05-29')group by addresshaving sum("withdraw amount") > 0), unwinds as (select address, amount as "unwind amount"from dune.infinifi.result_infinifi_lock_accountingwhere unwinding_timestamp >= timestamp '2026-05-29'), withdraw_unwind as (selectcoalesce(w.address, u.address) as address,coalesce(w."withdraw amount",0) as "withdraw amount",coalesce(u."unwind amount",0) as "unwind amount"from withdraws wfull join unwinds uon w.address = u.address), delevers as (select address, sum("delever amount") as "delever amount"from (selectcasewhen topic0 = 0xd602b36fb24934aef1bc2a658de029b486fa4c664a6e45de1f48e3fd1be25dd9then varbinary_substring(topic1,13,20)else varbinary_substring(topic2,13,20)end as address,varbinary_to_uint256(varbinary_substring(data,1,32)) *case when topic0 = 0xd602b36fb24934aef1bc2a658de029b486fa4c664a6e45de1f48e3fd1be25dd9then 1.0 else -1.0 end / 1e6 as "delever amount"from ethereum.logswherecontract_address = 0xbeEFF75262b2eC16a3C62a807F02EE7627654931 andtopic0 in (0xd602b36fb24934aef1bc2a658de029b486fa4c664a6e45de1f48e3fd1be25dd9, 0xdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7) andblock_time >= timestamp '2026-05-29')group by addresshaving sum("delever amount") > 0)select *, "withdraw amount" + "unwind amount" + "delever amount" as "total amount"from (selectcoalesce(w.address, d.address) as address,coalesce(w."withdraw amount",0) as "withdraw amount",coalesce(w."unwind amount",0) as "unwind amount",coalesce(d."delever amount",0) as "delever amount"from withdraw_unwind wfull join delevers don w.address = d.address)order by "total amount" desc