Query editor
/* WATTOIN ($WATT) — forecast vs actual fee revenueToken : 0xbeb55c3323755695CE14f687f7B72d504dfa7BDB (Polygon)Compares the 48-month simulation forecast against fee revenue actuallyrealized on chain, both expressed in USD so they share one axis.── WHAT WAS WRONG BEFORE (fixed 2026-08-28) ──────────────────────────────1. It read contract 0x2a92…9fdD on erc20_ethereum — that is $WELF, anunrelated 18-decimal token, not WATTOIN.2. Realized "fees" summed transfers where "from" = the null address andcommented them as a burn. A transfer FROM the null address is a MINT, sothe realized-revenue line was measuring issuance, not fee burn.3. It joined forecast month (an integer 1-48) to tf.idx (a ROW_NUMBER overmonths that had transfers). Any month without transfers shifted everylater index and silently misaligned forecast against actual. Month N isnow anchored to a real calendar month derived from the launch date.4. It selected both tf.month and fc.month, producing two columns named`month`; the chart bound whichever came first, and that one was NULL forevery forecast month with no actuals.5. It declared a `variables` CTE with kwh_price = 0.04 and then neverreferenced it, inlining the literal 0.04 twice instead. The price is nowa real parameter and is actually used.6. It divided by 1e18. WATTOIN has 0 decimals.── OPEN ITEMS ────────────────────────────────────────────────────────────* The fee-collector address is unconfirmed. Realized fees are taken astokens sent to a burn sink (null address or 0x…dEaD), which is zero todate. If fees accrue to a treasury or collector contract instead, add thataddress to `fee_sinks` below.* {{kwh_price_usd}} defaults to 0.04 and is a placeholder — replace with areal electricity price, ideally as an uploaded price series per month.* {{token_price_usd}} defaults to 0 because WATTOIN has no market yet, sorealized USD revenue reads 0 even if fee tokens are collected. The tokencolumn below shows the raw token figure regardless of price. */WITH launch AS (/* Anchor month 1 of the simulation to the month the token actuallylaunched, read from the supply query rather than hardcoded. */SELECT DATE_TRUNC('month', MIN(day)) AS launch_monthFROM query_6319014),forecast AS (SELECTmonth,transaction_fees_in_kwh,SUM(transaction_fees_in_kwh) OVER (ORDER BY month) AS cumulative_kwhFROM dune.chainforce.dataset_simulation_forecast_averaged),/* Forecast month integer -> real calendar month. */forecast_dated AS (SELECTf.month AS month_index,DATE_ADD('month', f.month - 1, l.launch_month) AS month_start,DATE_ADD('day', -1, DATE_ADD('month', f.month, l.launch_month)) AS month_end,f.transaction_fees_in_kwh,f.cumulative_kwhFROM forecast fCROSS JOIN launch l