Query editor
-- This query has been migrated to run on DuneSQL. If you need to change back because you’re seeing issues, use the Query History view to restore the previous version. If you notice a regression, please email [email protected].WITHtxns AS (SELECTCAST(token_amounts[1] AS DOUBLE) AS reth,CAST(token_amounts[2] AS DOUBLE) AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_AddLiquidityUNION ALLSELECT- CAST(token_amounts[1] AS DOUBLE) AS reth,- CAST(token_amounts[2] AS DOUBLE) AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_RemoveLiquidityUNION ALLSELECT- CAST(token_amounts[1] AS DOUBLE) AS reth,- CAST(token_amounts[2] AS DOUBLE) AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_RemoveLiquidityImbalanceUNION ALLSELECT- CAST(token_amount AS DOUBLE) AS reth,0 AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_RemoveLiquidityOneWHERE"evt_tx_hash" IN (SELECT"evt_tx_hash"FROMerc20_ethereum.evt_TransferWHERE"contract_address" = 0xae78736cd615f374d3085123a210448e74fc6393)UNION ALLSELECT0 AS reth,- CAST(token_amount AS DOUBLE) AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_RemoveLiquidityOneWHERE"evt_tx_hash" IN (SELECT"evt_tx_hash"FROMerc20_ethereum.evt_TransferWHERE"contract_address" = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0)UNION ALLSELECTcast("tokens_sold" as double) AS reth,- cast("tokens_bought" as double) AS wstethFROMcurvefi_ethereum.rETHwstETH_evt_TokenExchangeWHERE"sold_id" = cast(0 as int256)UNION ALL