ArioNosana reward per contributor
    Updated 2025-03-31
    with tab as (
    select
    tx_id,
    block_timestamp,
    INSTRUCTION:accounts[8] as user_address
    from solana.core.fact_events
    where PROGRAM_ID = 'nosJhNRqr2bc9g1nfGDcXXTXvYUmxD4cVwy2pMWhrYM'
    and SUCCEEDED
    and substr(utils.udf_base58_to_hex(fact_events.instruction :data), 3, 16) = '434aaa847de9b625' -- finish
    and block_timestamp >= '2024-10-01'
    group by 1,2,3
    )
    select
    date_trunc(month, fact_transfers.block_timestamp) as date,
    'Nosana' as Project,
    count(distinct user_address) as N_Contributor,
    sum(amount * price) as rewards_USD,
    rewards_USD / N_Contributor as reward_per_contributor
    from solana.core.fact_transfers
    join tab
    on fact_transfers.block_timestamp = tab.block_timestamp
    and fact_transfers.tx_to = tab.user_address
    and fact_transfers.tx_id = tab.tx_id
    join solana.price.ez_prices_hourly
    on ez_prices_hourly.token_address = fact_transfers.mint
    and date_trunc(hour, fact_transfers.block_timestamp) = ez_prices_hourly.hour
    and ez_prices_hourly.token_address = 'nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7'
    where fact_transfers.mint = 'nosXBVoaCTtYdLvKY6Csb4AC8JCdQKKAaWYtx2ZMoo7'
    and fact_transfers.block_timestamp >= '2024-10-01'
    group by 1,2
    Last run: 17 days ago
    DATE
    PROJECT
    N_CONTRIBUTOR
    REWARDS_USD
    REWARD_PER_CONTRIBUTOR
    1
    2024-11-01 00:00:00.000Nosana437103651.65943156237.189152017
    2
    2025-01-01 00:00:00.000Nosana59959138.5011321398.728716414
    3
    2024-10-01 00:00:00.000Nosana44987725.38167188195.379469202
    4
    2025-02-01 00:00:00.000Nosana104354223.37673970251.987897162
    5
    2024-12-01 00:00:00.000Nosana75669317.6696579891.69003923
    6
    2025-03-01 00:00:00.000Nosana123650021.83739863840.470742232
    6
    421B
    907s