Query editor
-- Calculate gas costs (enter and exit stETH positions)-- 1) Liquidity providing strategy: Euler, Maverick, Curve, Balancer-- 2) Leveraged staking Aave v2, v3, iETH-- 3) Passive holdingWITH euler_lp_enter AS(SELECT DISTINCT evt_tx_hash AS hash, account AS address, SUM(amount/1e18) AS ETHFROM euler_ethereum.Euler_evt_DepositWHERE underlying = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0GROUP BY 1, 2),euler_lp_exit AS(SELECT DISTINCT evt_tx_hash AS hash, account AS address, SUM(amount/1e18) AS ETHFROM euler_ethereum.Euler_evt_WithdrawWHERE underlying = 0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0GROUP BY 1, 2),maverick_lp_enter AS(SELECT DISTINCT evt_tx_hash AS hash, contract_address AS contractFROM maverick_v1_ethereum.pool_evt_AddLiquidityWHERE contract_address = 0x2ebe19aa2e29c8acadb14be3e7de153b0141e2aa),maverick_lp_exit AS(SELECT DISTINCT evt_tx_hash AS hash, contract_address AS contractFROM maverick_v1_ethereum.pool_evt_RemoveLiquidityWHERE contract_address = 0x2ebe19aa2e29c8acadb14be3e7de153b0141e2aa),passive_steth_enter AS(SELECT contract_address, evt_tx_hash AS hashFROM erc20_ethereum.evt_TransferWHERE contract_address = 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84)-- ,curve_lp_exit AS-- (-- SELECT DISTINCT ccr.evt_tx_hash AS hash, ct.value/1e18 AS token_supply-- FROM curvefi_ethereum.stETHconcentrated_evt_RemoveLiquidity AS ccr-- INNER JOIN curvefi_ethereum.stETHconcentrated_evt_Transfer AS ct ON ccr.evt_tx_hash = ct.evt_tx_hash-- WHERE ct.sender = 0x828b154032950C8ff7CF8085D841723Db2696056-- ),gas_used AS (SELECT DISTINCT hash AS hash, gas_limit, gas_used, (CAST(gas_used AS double) * CAST(gas_price AS double))/1e18 AS gas_used_ETHFROM ethereum.transactions),namespace AS (SELECT DISTINCT tx_hash AS hash, namespace, contract_nameFROM ethereum.traces_decoded)-- stETH deposit, why only 58 rows