freemartianTotal AISTR Users ACTIVITY
    Updated 2025-03-05
    WITH
    prices AS (
    SELECT
    hour::date AS price_day, AVG(price) AS price

    FROM base.price.ez_prices_hourly
    WHERE token_address = '0x20ef84969f6d81ff74ae4591c331858b20ad82cd'
    GROUP BY 1
    ),
    first_dist AS(
    SELECT block_timestamp, tx_hash, to_address AS user, amount AS first_amount_received,
    FROM base.core.ez_token_transfers
    WHERE contract_address = '0x20ef84969f6d81ff74ae4591c331858b20ad82cd'
    AND tx_hash = '0xcf585407c610647a46e7d8900b91db33df2d6276697f5bbf12e5be5d97796605'
    ORDER BY event_index ASC
    ),

    token_in_out AS(
    SELECT
    to_address AS user,
    SUM(amount) AS amount,
    FROM base.core.ez_token_transfers
    WHERE contract_address = '0x20ef84969f6d81ff74ae4591c331858b20ad82cd'
    GROUP BY 1
    UNION ALL
    SELECT
    from_address AS user,
    SUM(-amount) AS amount,
    FROM base.core.ez_token_transfers
    WHERE contract_address = '0x20ef84969f6d81ff74ae4591c331858b20ad82cd'
    GROUP BY 1
    ),
    current_user_amount AS(
    SELECT
    user,
    sum(amount) AS current_balance
    Last run: 21 days agoAuto-refreshes every 1 hour
    STAKE_AMOUNT
    SWAP_FROM_AISTR
    SWAP_FROM_AISTR_USD
    SWAP_TO_AISTR
    SWAP_TO_AISTR_USD
    1
    131535447.35168954566813335.9395226708366.54888576414464845.082318767868.64346
    1
    86B
    1218s