Query editor
-- select tx_hash, data, topic2, bytearray_to_int256(topic2), bytearray_to_int256(topic2) / 1e18-- from monad_testnet.logs-- where contract_address = 0x2c9C959516e9AAEdB2C748224a41249202ca8BE7-- and topic0 = 0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568-- limit 1withmagma_DP as (selectdate_trunc('day', block_time) as day, tx_from as signer, count(*) as n_dp, sum(bytearray_to_int256(data) / 1e18) as amount_depositedfrom monad_testnet.logswhere contract_address = 0xaEef2f6B429Cb59C9B2D7bB2141ADa993E8571c3and topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000and block_time between now() - interval '3' month and date_trunc('day', now()) - interval '1' secondgroup by 1, 2), magma_WD as (selectdate_trunc('day', block_time) as day, tx_from as signer, count(*) as n_wd, sum(bytearray_to_int256(data) / 1e18) as amount_redeemedfrom monad_testnet.logswhere contract_address = 0xaEef2f6B429Cb59C9B2D7bB2141ADa993E8571c3and topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand topic2 = 0x0000000000000000000000000000000000000000000000000000000000000000and block_time between now() - interval '3' month and date_trunc('day', now()) - interval '1' secondgroup by 1, 2), fusion as (selectcoalesce(dp.day, wd.day) as day, coalesce(dp.signer, wd.signer) as signer, coalesce(n_wd, 0) + coalesce(n_dp, 0) as txns, coalesce(amount_deposited, 0) as amount_deposited, coalesce(amount_redeemed, 0) as amount_redeemedfrom magma_DP dp full outer join magma_WD wdon dp.day = wd.dayand dp.signer = wd.signer)selectday, sum(txns) as txns, count(distinct signer) as users, sum(amount_deposited) - sum(amount_redeemed) as magma_net_flow, 2155367 + sum(sum(amount_deposited) - sum(amount_redeemed)) over (order by day asc) as magma_circ_supplyfrom fusiongroup by 1order by 1