Query editor
/** ======================================================================================* [Title] [TON] Whale Exit Profiler: Individual Identity Analysis (Migration Adjusted)* ======================================================================================** [Description]* This query lists individual whale addresses exiting the staking contract (>50k TON)* and profiles their "Investor Identity" based on entry timing and holding duration.** [⚠️ CRITICAL LOGIC: Migration Adjustment]* - The current staking contract started around Oct/Nov 2023.* - Problem: Simple duration calculation treats original early backers as "New Users" (short duration).* - Solution: We set a 'Migration Cutoff Date' (2023-11-01).* -> Any entry BEFORE this date is forced into the "Genesis" category (Old Money).* -> Entries AFTER this date are calculated as organic duration.** [Classification Categories]* 1. 🦕 Genesis Staker (The "Old Money")* - Entry: Before Nov 1, 2023 (Migrators).* - Significance: Early backers or founding members. Their exit suggests a loss of long-term conviction.** 2. 🦈 Long-term Staker (The "Believers")* - Entry: After Nov 1, 2023 | Duration: > 365 Days.* - Significance: Investors who joined post-migration but stayed loyal for a year.** 3. 🐟 Short-term Staker (The "Traders")* - Entry: After Nov 1, 2023 | Duration: < 30 Days.* - Significance: Speculative capital, arbitrageurs, or "Hit & Run" traders.* Their exit is often just healthy profit-taking or rotation, not a structural risk.** 4. ⚪️ Mid-term Staker* - Entry: After Nov 1, 2023 | Duration: 30 ~ 365 Days.* - Significance: General medium-term investors.* ======================================================================================*/WITH params AS (SELECTDATE('2024-01-01') AS report_start_date,CURRENT_DATE AS report_end_date,DATE('2023-11-01') AS migration_cutoff_date),target_whales AS (SELECTw.depositor,DATE(w.evt_block_time) AS exit_date,SUM(CAST(w.amount AS DOUBLE) / 1e27) AS total_exit_amount,COUNT(*) AS tx_count,MIN(w.evt_block_time) as Earliest_Exit_Time,MIN_BY(w.evt_tx_hash, w.evt_block_time) AS sample_tx_hashFROM ton_staking_ethereum.DepositManager_evt_WithdrawalRequested wCROSS JOIN params pWHERE DATE(w.evt_block_time) BETWEEN p.report_start_date AND p.report_end_dateGROUP BY 1, 2HAVING SUM(CAST(w.amount AS DOUBLE) / 1e27) >= 50000),first_stake AS (SELECT