Query editor
/** [Title] VWASD Trend & Daily Whale Exit Detector (30d Rolling + Daily)** [Description]* This query combines a 30-day rolling trend of Volume-Weighted Average Staking Duration (VWASD)* with precise daily exit statistics. It helps distinguish between "Short-term Speculative Outflows"* and "Long-term Holder Exits".** [Metrics]* 1. Rolling_30d_VWASD (Line Chart):* - Shows the general retention trend of exiters over the past 30 days.* - High trend = Old money is leaving / Low trend = New money is leaving.** 2. Daily_Exit_Amount (Bar Chart):* - Shows the exact volume of TON unstaked on that specific day.* - Use this to identify "When" the event happened.** 3. Daily_Specific_VWASD (Data Point):* - The weighted average duration specifically for that day's exiters.* - Use this to identify "Who" left (New Whale vs Old Whale).** [How to Read]* - If 'Daily_Exit_Amount' spikes AND 'Daily_Specific_VWASD' is LOW:* -> "Hit and Run" by a new whale (Short-term speculation).* - If 'Daily_Exit_Amount' spikes AND 'Daily_Specific_VWASD' is HIGH:* -> "Exit" by a long-term holder.*/WITH deposits AS (SELECTdepositor,evt_block_time,CAST(amount AS DOUBLE) / 1e27 AS amountFROM ton_staking_ethereum.DepositManager_evt_Deposited),withdrawals AS (SELECTdepositor,evt_block_time,CAST(amount AS DOUBLE) / 1e27 AS amountFROM ton_staking_ethereum.DepositManager_evt_WithdrawalRequested),first_stake AS (SELECTdepositor,MIN(evt_block_time) AS first_stake_timeFROM depositsGROUP BY depositor),range_bounds AS (SELECTCAST(MIN(DATE(evt_block_time)) AS DATE) as start_date,CURRENT_DATE as end_dateFROM withdrawals),date_series AS (