Query editor
/*-- @title: ENS - EnDAOment - Aura WSTETH Strategy-- @description: Analyzes deposits, withdrawals, instant fees, and accruals for ENS' Aura wstETH Strategy-- @author: Steakhouse Financial-- @notes:- First transfer was on 2023-01-30; applying a filter from 2023-01-01-- @version:- 2.0 - 2024-03-07: improving performance & adding comments- Added comment header- Added token descriptions on contract addresses- Removed CTE aurawsteth_wallet_list and added where X = 0x4f20..fe64 in aurawsteth_prices' joins- Replaced some date casts with simpler syntax- 1.0 - 2023-05-22 - Initial release*/WITHaurawsteth_prices AS (SELECTDATE_TRUNC('DAY', minute) AS period,contract_address,priceFROMprices.usdWHEREblockchain = 'ethereum'AND minute > date '2023-01-01'AND EXTRACT(HOUR FROM minute) = 23AND EXTRACT(MINUTE FROM minute) = 59AND contract_address = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2),aurawsteth_aura_deposits_withdrawals_1 AS (SELECTevt_block_time AS ts,evt_tx_hash AS hash,owner AS wallet,CAST(assets AS DOUBLE) / 1e18 AS aura_deposit_amount /* also same as balancer deposit amount */FROMaura_finance_ethereum.BaseRewardPool4626_evt_DepositWHEREcontract_address = 0xe4683fe8f53da14ca5dac4251eadfb3aa614d528AND owner = 0x4f2083f5fbede34c2714affb3105539775f7fe64 -- ENS: EnDAOmentUNION ALLSELECTevt_block_time AS ts,evt_tx_hash AS hash,owner AS wallet,- CAST(assets AS DOUBLE)/ 1e18 AS aura_deposit_amount /* also same as balancer deposit amount */FROMaura_finance_ethereum.BaseRewardPool4626_evt_WithdrawWHEREcontract_address = 0xe4683fe8f53da14ca5dac4251eadfb3aa614d528AND owner = 0x4f2083f5fbede34c2714affb3105539775f7fe64 -- ENS: EnDAOmentUNION ALLSELECTevt_block_time AS ts,evt_tx_hash AS hash,user AS wallet,- CAST(amount AS DOUBLE)/ 1e18 AS aura_deposit_amount /* also same as balancer deposit amount */FROMaura_finance_ethereum.BaseRewardPool4626_evt_Withdrawn