cypherOsmosis user behaviour - bridge satellite stats
    Updated 2022-11-11
    --Osmosis is far and away the liquidity hub of the Cosmos.
    -- Axelar is acting as the primary liquidity bridge into ecosystem.
    -- Analyze activity on Osmosis once a user bridges via Axlear's Satellite.
    -- What asset do they most use to bridge? Once bridged what do they do next?

    with pricet as (
    select recorded_at::date as day,
    lower (symbol) as symbol,
    avg (price) as USDPrice
    from osmosis.core.dim_prices
    group by 1,2

    union ALL

    select recorded_at::date as day,
    'axl' as symbol2,
    avg (price) as USDPrice
    from osmosis.core.dim_prices
    where symbol ilike 'axl'
    group by 1,2),

    Table1 as (
    select *,
    regexp_substr (sender,'[a-zA-Z]+|\d+') as Sender_Chain,
    regexp_substr (receiver,'[a-zA-Z]+|\d+') as Receiver_Chain,
    Sender_Chain|| ' to ' || Receiver_Chain as Transfer_Path,
    lower (split(currency,'-')[0]) as Symbol1,
    iff (Symbol1 ilike 'u%',substring(Symbol1,2,LEN(Symbol1)), Symbol1) as Symbol
    from axelar.core.fact_transfers
    where transfer_type in ('IBC_TRANSFER_IN','IBC_TRANSFER_OUT')
    and TX_SUCCEEDED = 'TRUE'),

    Table2 as (
    select t1.*,
    ((amount / POW (10,decimal))*iff(t1.currency in ('cusdc','usdt','uusd','uusdc','uusdt','dai'), 1, USDPrice)) as USDVolume,
    amount / pow(10, decimal) as coin_amount
    Run a query to Download Data