pouya_22Liquidswap-stats-swaptype
    Updated 4 hours ago
    with stables as (
    select distinct symbol
    from external.defillama.dim_stablecoins
    )

    select
    'Swap From Stablecoins' as swap_type,
    date_trunc(week, block_timestamp) as date,
    count(distinct tx_hash) as swaps,
    sum(amount_in_usd) as swap_volume,
    sum(swaps) over(order by date) as total_swaps,
    sum(swap_volume) over(order by date) as total_swap_volume
    from aptos.defi.ez_dex_swaps
    where platform = 'liquidswap'
    and block_timestamp >= dateadd(month, -{{month}}, current_date)
    and symbol_in in (select symbol from stables)
    group by date

    union all

    select
    'Swap To Stablecoins' as swap_type,
    date_trunc(week, block_timestamp) as date,
    count(distinct tx_hash) as swaps,
    sum(amount_in_usd) as swap_volume,
    sum(swaps) over(order by date) as total_swaps,
    sum(swap_volume) over(order by date) as total_swap_volume
    from aptos.defi.ez_dex_swaps
    where platform = 'liquidswap'
    and block_timestamp >= dateadd(month, -{{month}}, current_date)
    and symbol_out in (select symbol from stables)
    group by date

    union all

    select
    Last run: about 4 hours agoAuto-refreshes every 24 hours
    SWAP_TYPE
    DATE
    SWAPS
    SWAP_VOLUME
    TOTAL_SWAPS
    TOTAL_SWAP_VOLUME
    1
    Swap From Stablecoins2024-01-15 00:00:00.000527542904337.08612834301367945415551.4017948
    2
    Swap From Stablecoins2024-10-21 00:00:00.0009948611138606.45454365819653615371440.34488
    3
    Swap From Stablecoins2024-06-03 00:00:00.0008029819093067.64444754758270440146850.656277
    4
    Swap From Stablecoins2023-12-25 00:00:00.0001073992141593.92964751281937138860183.6583329
    5
    Swap From Stablecoins2023-07-17 00:00:00.00047098665398.80800431683067422159469.1902286
    6
    Swap To Stablecoins2024-06-03 00:00:00.0008422619195511.25332865703547534819818.494361
    7
    Swap To Stablecoins2024-01-15 00:00:00.000557054546830.169105153603007134199281.646798
    8
    Swap To Stablecoins2024-10-21 00:00:00.00010164311741602.99930886822926708755200.55169
    9
    Swap To Stablecoins2023-12-25 00:00:00.0001212194854483.746146443390768119403614.166251
    10
    Swap To Stablecoins2023-07-17 00:00:00.000468981328797.655558888083975563157.2790032
    11
    Altcoin Swaps2024-10-21 00:00:00.00028150118328439.32125276503794621814347.422517
    12
    Altcoin Swaps2024-06-03 00:00:00.00010410424770559.70112963804977337029746.972028
    13
    Altcoin Swaps2024-01-15 00:00:00.000358761641563.18578578176468944277912.7481965
    14
    Altcoin Swaps2023-12-25 00:00:00.000605651593703.45102811167777740668326.1020744
    15
    Altcoin Swaps2023-07-17 00:00:00.00017473213567.70983740855617730333071.7591608
    16
    Swap From Stablecoins2024-08-05 00:00:00.000353587946040.702637985165420516730987.338571
    17
    Swap From Stablecoins2023-10-09 00:00:00.00065278267349.774235542217659329322995.0890677
    18
    Swap From Stablecoins2024-03-25 00:00:00.00010672534049129.55486273916401217067961.265764
    19
    Swap From Stablecoins2025-02-17 00:00:00.000292997212291.855365357081658907446862.463739
    20
    Swap From Stablecoins2023-07-24 00:00:00.00061372678477.46003485889204622837946.6502635
    ...
    381
    36KB
    36s