Query editor
-- =====================================================================-- Fluid Lite ETH Vault (iETHv2) — Daily Metrics — v1---- ETH counterpart of the Fluid Lite USD daily-metrics query (7432788).-- Methodology differs by design: iETHv2 (v2 architecture) has NO fixed-- rate — net user APR is measured directly from the exchange-price-- checkpoints emitted by LogUpdateExchangePrice. exchangePrice is net-- of revenue fee and strategy losses, and nets ALL strategies including-- the Fluid-vault legs held via the vault DSA — it cannot miss-- positions by construction.---- Vault: iETHv2 0xA0D3707c569ff8C87FA923d3823eC5D81c98Be78 (ERC-4626,-- asset stETH, 18/18 decimals, exchangePrice 1e18 precision,-- deployed block 16609585, 2023-02-12)-- Event: LogUpdateExchangePrice(uint256 indexed before, uint256 indexed after)-- topic0 0xcde545703e0372175cadfff811d67c32910c3dcb33199679b3271c4106afdf9a-- both params INDEXED -> price read from topic2, NOT data.---- Columns-- exchange_price : stETH per iETHv2 share (last checkpoint of day, fwd-filled)-- apr_7d/apr_30d : trailing net user APR %, (p_t/p_{t-d}-1)*365/d*100-- apr_lifetime : annualized since inception (price started at 1.0)-- tvl_steth : totalSupply (cumulative Transfer mints-burns) * exchange_price-- tvl_usd : tvl_steth * stETH USD price (prices.day)-- apr_* NULLed on the current (incomplete) UTC day.-- =====================================================================with inception as (select date '2023-02-12' as start_day), days as (select cast(i.start_day + n * interval '1' day as date) as dayfrom inception as icross join unnest(sequence(0,cast(date_diff('day', i.start_day, current_date) as integer))) as t(n))-- exchange-price checkpoints: last event per day, px_events as (selectcast(block_time as date) as day, block_time, cast(varbinary_to_uint256(topic2) as double) / 1e18 as pricefrom ethereum.logswhere contract_address = 0xa0d3707c569ff8c87fa923d3823ec5d81c98be78and topic0 = 0xcde545703e0372175cadfff811d67c32910c3dcb33199679b3271c4106afdf9aand block_number >= 16609585), px_daily as (select day, max_by(price, block_time) as pricefrom px_eventsgroup by day)-- iETHv2 share supply from ERC-20 Transfer mints/burns, supply_deltas as (