permaryfree-bronze
    Updated 2025-03-14
    WITH fmon_airdrop_events AS (
    SELECT
    tx_hash,
    '0x'||SUBSTRING(topics[1], 27) AS distributor_contract,
    '0x'||SUBSTRING(topics[2], 27) AS recipient_wallet,
    CAST(ethereum.public.udf_hex_to_int(data) AS NUMERIC) / 1e18 AS fmon_amount,
    block_timestamp
    FROM monad.testnet.fact_event_logs
    WHERE
    contract_address = lower('0x89e4a70de5F2Ae468B18B6B6300B249387f9Adf0') -- FMON Token Contract
    AND topics[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef' -- ERC-20 Transfer
    AND block_timestamp BETWEEN '2025-03-12 17:35:46' AND '2025-03-13 22:24:53'
    AND '0x'||SUBSTRING(topics[1], 27) = lower('0xdCf3c00e9F8A2FdaaF19Fe59050e80c433b509DC') -- Airdrop contract distributing FMON
    ),

    tx_durations AS (
    SELECT
    tx_hash,
    MIN(block_timestamp) AS first_transfer_time,
    MAX(block_timestamp) AS last_transfer_time,
    TIMESTAMPDIFF(SECOND, MIN(block_timestamp), MAX(block_timestamp)) AS tx_duration_seconds
    FROM fmon_airdrop_events
    GROUP BY tx_hash
    ),

    avg_tx_time AS (
    SELECT AVG(tx_duration_seconds) AS avg_tx_duration_seconds
    FROM tx_durations
    )

    SELECT
    COUNT(DISTINCT recipient_wallet) AS unique_recipients,
    SUM(fmon_amount) AS total_fmon_airdropped,
    (SELECT SUM(tx_duration_seconds) FROM tx_durations) AS total_time_spent_seconds,
    (SELECT avg_tx_duration_seconds FROM avg_tx_time) AS avg_time_per_txn_seconds
    FROM fmon_airdrop_events;

    Last run: about 1 month ago
    UNIQUE_RECIPIENTS
    TOTAL_FMON_AIRDROPPED
    TOTAL_TIME_SPENT_SECONDS
    AVG_TIME_PER_TXN_SECONDS
    1
    999197400000132892332.0600
    1
    33B
    16s