Query editor
WITH-- ============================================================-- DEPOSITS (all time)-- ============================================================deposits_raw AS (SELECTDATE_TRUNC('day', l.block_time) AS day,bytearray_to_uint256(SUBSTR(l.data, 33, 32)) / 1e18 AS rseth_mint_amountFROM ethereum.logs lWHERE l.contract_address = 0x036676389e48133B63a802f8635AD39E752D375DAND l.topic0 IN (0x8b0422d41caf5eb583695377e98b5041a1d241a7c80483cf182b1311c48c93b7,0x07c31fccf51996f0f4ea01c3a55191786b3a8cd89f696db4d42adaa99b0e15f1)-- No time filter — all time),daily_deposits AS (SELECT day, SUM(rseth_mint_amount) AS total_depositedFROM deposits_rawGROUP BY day),-- ============================================================-- WITHDRAWALS (all time)-- ============================================================withdrawal_raw AS (-- Standard: queued withdrawalsSELECTDATE_TRUNC('day', w.block_time) AS day,bytearray_to_uint256(bytearray_substring(w.data, 1, 32)) / 1e18 AS amount_withdrawn,w.tx_hash,w.index AS log_indexFROM ethereum.logs wWHERE w.contract_address = 0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16AND w.topic0 = 0xd1ff36888873897951eaf991bca7db625b8ed70bf2b0d54441907bdab02b08d7-- No time filter — all timeUNION ALL-- Instant: finalized with no matching queued eventSELECTDATE_TRUNC('day', w.block_time) AS day,bytearray_to_uint256(bytearray_substring(w.data, 1, 32)) / 1e18 AS amount_withdrawn,w.tx_hash,w.index AS log_indexFROM ethereum.logs wWHERE w.contract_address = 0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16AND w.topic0 = 0xca13475b00c46ee0ce4a479bd18ed747ff89395e96e93779ba7f18cbe1735fb4-- No time filter — all timeAND NOT EXISTS (SELECT 1FROM ethereum.logs qWHERE q.contract_address = 0x62de59c08eb5dae4b7e6f7a8cad3006d6965ec16AND q.topic0 = 0xd1ff36888873897951eaf991bca7db625b8ed70bf2b0d54441907bdab02b08d7AND q.topic1 = w.topic1AND bytearray_to_uint256(bytearray_substring(q.data, 1, 32))= bytearray_to_uint256(bytearray_substring(w.data, 1, 32))-- No time filter here either — look back across all history)