Query editor
-- To maintain this query, add new token addresses to the CASE statements in the eth_transactions and arb_transactions tables with new tokens that are supported by the pool.WITH hourly_prices AS (SELECTsymbol,DATE_TRUNC('hour', minute) as hour,AVG(price) as hourly_priceFROMprices.usdWHERE blockchain = 'ethereum'-- MODIFY BELOW TO ADD NEW TOKENS, all lower caseAND LOWER(symbol) in ('wsteth', 'weeth', 'rseth', 'reth', 'ankreth', 'cbeth', 'stone', 'frxeth') -- sfrxETH is not in coinpaprika, so approximate it with frxETHAND minute >= date '2024-07-01' -- query optimizationGROUP BY 1, 2),eth_deposits AS (SELECTevt_tx_hash,evt_index,evt_block_time,evt_block_number,user,token,amount / POW(10, 18) AS amount,'deposit' as "type"FROM bracket_ethereum.BracketEscrow_evt_Deposit),eth_withdrawals AS (SELECTevt_tx_hash,evt_index,evt_block_time,evt_block_number,user,token,-amount / POW(10, 18) AS amount,'withdrawal' as "type"FROM bracket_ethereum.BracketEscrow_evt_Withdraw),eth_transactions AS (SELECTevt_tx_hash,evt_index,evt_block_time,evt_block_number,user,amount,"type",-- MODIFY BELOW TO ADD NEW TOKENSCASEWHEN token = 0xA1290d69c65A6Fe4DF752f95823fae25cB99e5A7THEN 'rsETH'WHEN token = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0THEN 'wstETH'WHEN token = 0xCd5fE23C85820F7B72D0926FC9b05b43E359b7eeTHEN 'weETH'WHEN token = 0xae78736cd615f374d3085123a210448e74fc6393THEN 'rETH'WHEN token = 0xE95A203B1a91a908F9B9CE46459d101078c2c3cbTHEN 'ankrETH'WHEN token = 0xBe9895146f7AF43049ca1c1AE358B0541Ea49704