CryptoIcicleAbra-MIM Use Cases - USDT
    Updated 2022-02-09
    -- How is MIM used in comparison to USDC / USDT / UST or a stablecoin of your choice?
    -- Describe user behavior.
    -- What protocols or contracts are users interacting with?
    -- Compare the count and volume of transactions


    with

    txns as (
    select
    date_trunc('month',block_timestamp) as date,
    platform,
    CASE
    WHEN token_address = '0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3' THEN 'MIM'
    WHEN token_address = '0xdac17f958d2ee523a2206206994597c13d831ec7' THEN 'USDT'
    END as symbol,
    pool_name,
    count(distinct tx_id) as swap_frequency,
    sum(amount_usd) as swap_volume,
    count(distinct(from_address)) as no_of_unique_users,
    avg(amount_usd) as avg_swap_size,
    max(amount_usd) as max_swap_size,
    median(amount_usd) as median_swap_size
    from ethereum.dex_swaps
    where token_address in ('0x99d8a9c45b2eca8864373a26d1459e3dff1e17f3', '0xdac17f958d2ee523a2206206994597c13d831ec7')
    and block_timestamp >= CURRENT_DATE - 180
    group by date, pool_name, symbol, platform
    )

    select * from txns where symbol = 'USDT'
    Run a query to Download Data