Query editor
-- vltUSDC · 11 — VLT market & liquidity (mirrors the dApp's Stats → VLT card)-- price : V4 = the vault's own pool; V2 = the legacy WETH/VLT pair at that day's ETH close.-- supply : VLT is fixed (no mint function) — derived from mint/burn Transfers so the-- 1,800,000 carries its own proof.-- NOTE: read from erc20_ethereum.evt_Transfer, NOT the decoded VaultToken table-- — the latter was only indexed forward from the 2026-08-11 decode submission-- and holds 19 events, so it derives a supply of 0.-- liquidity : V4 = the vault position's VLT+USDC at pool price; V2 = pair reserves.-- shares : supply_in_liquidity_pct = (V4 VLT + V2 VLT) / supply-- working_in_vault_pct = V4 VLT / supply — Proof-of-Liquidity.-- V2 pair 0x966053ca…794534: VLT (0x6b78…) sorts below WETH (0xc02a…), so reserve0 = VLT.-- Rows are NEWEST FIRST so counter tiles read row 1; charts set sort_x and re-sort by date.-- Params: {{vault_address}} (text, 0x-prefixed).WITH params AS (SELECT FROM_HEX(SUBSTR(LOWER('{{vault_address}}'), 3)) AS vault),pool AS (SELECT id AS pool_idFROM uniswap_v4_ethereum.PoolManager_evt_InitializeWHERE currency0 = 0x6b785a0322126826d8226d77e173d75dafb84d11AND currency1 = 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48AND fee = 10000 AND "tickSpacing" = 200AND hooks = 0x0000000000000000000000000000000000000000),vlt_supply AS (SELECT SUM(CASE WHEN "from" = 0x0000000000000000000000000000000000000000 THEN CAST(value AS DOUBLE)WHEN "to" = 0x0000000000000000000000000000000000000000 THEN -CAST(value AS DOUBLE)ELSE 0 END) / 1e18 AS supplyFROM erc20_ethereum.evt_TransferWHERE contract_address = 0x6b785a0322126826d8226d77e173d75dafb84d11),liq_daily AS (SELECT CAST(ml.evt_block_time AS DATE) AS day,SUM(CAST(ml."liquidityDelta" AS DOUBLE)) AS dlFROM uniswap_v4_ethereum.PoolManager_evt_ModifyLiquidity mlJOIN pool ON ml.id = pool.pool_idCROSS JOIN paramsWHERE ml.sender = params.vaultGROUP BY 1),price_daily AS (SELECT CAST(s.evt_block_time AS DATE) AS day,MAX_BY(CAST(s."sqrtPriceX96" AS DOUBLE), s.evt_block_time) AS sqrt_px96FROM uniswap_v4_ethereum.PoolManager_evt_Swap sJOIN pool ON s.id = pool.pool_idGROUP BY 1),v2_daily AS (SELECT CAST(evt_block_time AS DATE) AS day,MAX_BY(CAST(reserve0 AS DOUBLE), evt_block_time) / 1e18 AS v2_vlt,MAX_BY(CAST(reserve1 AS DOUBLE), evt_block_time) / 1e18 AS v2_wethFROM uniswap_v2_ethereum.Pair_evt_SyncWHERE contract_address = 0x966053ca4fca049173eb1f27e4cb168ccb794534GROUP BY 1),eth_daily AS (SELECT CAST("timestamp" AS DATE) AS day, price AS eth_usdFROM prices.dayWHERE blockchain = 'ethereum'