CryptoIcicleOsmosis - 1. Osmosis & Stride - Transfers
    Updated 2023-07-21
    -- How has Stride's LSD stOSMO impacted validators in the active set? Track the impact of undelegations & transfers to Stride.
    -- Which validators were the most impacted by stOSMO? Have the validators most impacted by undelegation received ample delegations from the Stride ICA?
    -- How has Strides ICA staking activity increased/decreased decentralization across the active set?
    -- Basis of Payment:
    -- To be eligible for payment.
    -- The submission must be sent before the deadline indicated on the bounty page.
    -- The submission must score a minimum of 6 points according to the Evaluation Criteria.
    -- 💰 Payout
    -- Rank Based Payout
    -- Payout is in OSMO and xMETRIC, where the top eligible scorers are paid the amounts below.
    -- Only the top 5 submissions are eligible for payout, and Submissions must have a score of 10 or higher to be eligible for payout, and only the top 5 are paid!
    -- If there are not enough eligible submissions for a category, remaining funds will either be paid to lower tier submissions
    -- or reserved for future bounty programs. Final determination of payouts and rankings are at the discretion of the MetricsDAO Bounty Operations Team.
    -- OSMO Payouts:
    -- Rank OSMO amount
    -- 1st Rank 425 USD worth of OSMO
    -- 2st Rank 250 USD worth of OSMO
    -- 3rd Rank 150 USD worth of OSMO
    -- 4th Rank 100 USD worth of OSMO
    -- 5th Rank 75 USD worth of OSMO

    -- SQL Credit: https://app.flipsidecrypto.com/velocity/queries/f273ca37-4b5d-4f8f-b011-c69e242846f9


    SELECT
    date_trunc('{{date_range}}',block_timestamp) as date,
    TRANSFER_TYPE as type,
    count(distinct tx_id) as n_transfers,
    count(distinct sender) as n_wallets,
    sum(iff(TRANSFER_TYPE = 'IBC_TRANSFER_OUT', -1 * amount/1e6, amount/1e6)) as osmo_volume,
    sum(n_wallets) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_n_wallets,
    sum(n_transfers) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_n_transfers,
    sum(osmo_volume) over (partition by type order by date asc rows between unbounded preceding and current row) as cum_osmo_volume,
    sum(osmo_volume) over (order by date asc rows between unbounded preceding and current row) as net_osmo_volume
    FROM osmosis.core.fact_transfers
    Run a query to Download Data