MasiwETH deposit rate
    Updated 2022-06-14
    with stake as (select currency ,LIQUIDITY_PROVIDER_ADDRESS, tx_id , amount/pow(10,decimal) as amount
    from osmosis.core.fact_liquidity_provider_actions
    where currency in ('ibc/EA1D43981D5C9A1C4AAEA9C23BB1D4FA126BA9BC7020A25E0AE4AA841EA25DC5','ibc/65381C5F3FD21442283D56925E62EA524DED8B6927F0FF94E21E0020954C40B5')
    and action = 'pool_joined' and TX_STATUS = 'SUCCEEDED' and block_timestamp::date >= '2022-01-01')
    ,
    weth as ( select case when currency = 'ibc/65381C5F3FD21442283D56925E62EA524DED8B6927F0FF94E21E0020954C40B5' then 'gwETH'
    when currency = 'ibc/EA1D43981D5C9A1C4AAEA9C23BB1D4FA126BA9BC7020A25E0AE4AA841EA25DC5' then 'axlWETH' end as token,LIQUIDITY_PROVIDER_ADDRESS, tx_id , amount
    from stake)
    ,
    final_osmo as ( select token ,count(DISTINCT(LIQUIDITY_PROVIDER_ADDRESS)) as total_user,
    count(DISTINCT(tx_id)) as total_deposit , sum(amount) as total_amount
    from weth
    where amount > 0
    group by 1
    order by 1)
    ,
    thor as (select count(DISTINCT(tx_id)) as total_deposit, sum(asset_amount) as total_amount
    from flipside_prod_db.thorchain.liquidity_actions
    where lp_action = 'add_liquidity' and pool_name ilike '%.ETH%' and block_timestamp::date >= '2022-01-01'
    and asset_amount > 0
    order by 1 )
    ,
    sushi_pools as ( select pool_address
    from ethereum.core.dim_dex_liquidity_pools
    where platform ='sushiswap' and (token0 = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2' or token1 = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'))
    ,
    sushi as (select count(DISTINCT(tx_hash)) as total_deposit, sum(raw_amount/pow(10,18)) as total_amount
    from ethereum.core.fact_token_transfers
    where to_address in ( select pool_address from sushi_pools) and contract_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
    and origin_function_signature = '0xe8e33700' and block_timestamp::date > '2022-01-01'
    order by 1)

    select 'Osmosis' as network , total_deposit , total_amount
    from final_osmo
    UNION
    select 'ThorChain' as network , total_deposit , total_amount
    Run a query to Download Data