Query editor
WITH daily_prices AS (-- Average daily price MONSELECTDATE_TRUNC('day', minute) AS day,AVG(price) AS price_usdFROM prices.usdWHERE symbol = 'MON'AND minute >= TRY_CAST('2025-11-24' AS TIMESTAMP)GROUP BY 1),fee_breakdown AS (-- Calculate fees per transaction in MONSELECTDATE_TRUNC('day', block_time) AS day,-- Priority fee per transaction(CAST(gas_used AS DOUBLE) * CAST(priority_fee_per_gas AS DOUBLE)) / 1e18 AS priority_fee_mon,-- Base fee per transaction (Total Gas Price - Priority Fee)(CAST(gas_used AS DOUBLE) * (CAST(gas_price AS DOUBLE) - CAST(priority_fee_per_gas AS DOUBLE))) / 1e18 AS base_fee_monFROM monad.transactionsWHERE block_time >= TRY_CAST('2025-11-24' AS TIMESTAMP)),block_rewards AS (-- Calculate network inflation: 25 MON created per block (2% inflation rate)SELECTDATE_TRUNC('day', "time") AS day,COUNT(number) * 25 AS inflation_rewards_monFROM monad.blocksWHERE "time" >= TRY_CAST('2025-11-24' AS TIMESTAMP)GROUP BY 1)SELECTf.day,-- Real Economic Value (Base Fee + Prio Fee)(SUM(f.base_fee_mon) + SUM(f.priority_fee_mon)) AS real_economic_value_mon,(SUM(f.base_fee_mon) + SUM(f.priority_fee_mon)) * p.price_usd AS real_economic_value_usd,-- Fee details (split between base fees and priority fees)SUM(f.base_fee_mon) AS total_base_fee_mon,SUM(f.base_fee_mon) * p.price_usd AS total_base_fee_usd,SUM(f.priority_fee_mon) AS total_priority_fee_mon,SUM(f.priority_fee_mon) * p.price_usd AS total_priority_fee_usd,-- Inflationb.inflation_rewards_mon AS total_inflation_mon,b.inflation_rewards_mon * p.price_usd AS total_inflation_usd,-- Total Economic Value (Fees + Inflation)(SUM(f.base_fee_mon) + SUM(f.priority_fee_mon) + b.inflation_rewards_mon) AS total_validator_revenue_mon,(SUM(f.base_fee_mon) + SUM(f.priority_fee_mon) + b.inflation_rewards_mon) * p.price_usd AS total_validator_revenue_usdFROM fee_breakdown AS fLEFT JOIN block_rewards AS b ON f.day = b.dayLEFT JOIN daily_prices AS p ON f.day = p.dayGROUP BY f.day, p.price_usd, b.inflation_rewards_monORDER BY f.day DESC;