kingneduStablecoin swaps
    Updated 2024-12-10
    -- Query to analyze stablecoin swaps on the APTOS blockchain
    WITH stablecoin_swaps AS (
    SELECT
    BLOCK_TIMESTAMP,
    PLATFORM,
    TOKEN_IN,
    SYMBOL_IN,
    TOKEN_OUT,
    SYMBOL_OUT,
    AMOUNT_IN_USD,
    AMOUNT_OUT_USD
    FROM
    aptos.defi.ez_dex_swaps
    WHERE
    SYMBOL_IN IN ('USDC', 'USDT', 'DAI', 'MOD', 'BUIDL', 'USDY') -- Add other stablecoins if applicable
    AND BLOCK_TIMESTAMP::DATE BETWEEN '2024-10-01' AND '2025-01-01'
    )

    SELECT
    date_trunc('month', block_timestamp::date) AS month,
    SYMBOL_IN AS Stable_Coin,
    SYMBOL_OUT AS Swapped_To,
    COUNT(*) AS Swap_Count,
    SUM(AMOUNT_IN_USD) AS Total_Stablecoin_In_USD,
    SUM(AMOUNT_OUT_USD) AS Total_Out_USD
    FROM
    stablecoin_swaps
    GROUP BY
    month,
    SYMBOL_IN,
    SYMBOL_OUT
    ORDER BY
    month;

    Last run: 22 days ago
    MONTH
    STABLE_COIN
    SWAPPED_TO
    SWAP_COUNT
    TOTAL_STABLECOIN_IN_USD
    TOTAL_OUT_USD
    1
    2024-10-01 00:00:00.000MOD10.00197487
    2
    2024-10-01 00:00:00.000USDCUSDC23076511021093.452357411019987.919781
    3
    2024-10-01 00:00:00.000DAIMOVE20.0009978946563
    4
    2024-10-01 00:00:00.000USDTMEE570.47181525830.4790643047
    5
    2024-10-01 00:00:00.000USDTAmero19.99245e-7
    6
    2024-10-01 00:00:00.000USDTCUNT10.000013907838
    7
    2024-10-01 00:00:00.000USDCBonk7439.311457947
    8
    2024-10-01 00:00:00.000USDCWAR30.02994875
    9
    2024-10-01 00:00:00.000USDCAPTSWAP22317.820079454
    10
    2024-10-01 00:00:00.000USDCMMPA17966.349017316
    11
    2024-10-01 00:00:00.000USDTMICRO10.00262524
    12
    2024-10-01 00:00:00.000USDCsthAPT30.116879965
    13
    2024-10-01 00:00:00.000USDTdoodoo110.419694689837.076902856
    14
    2024-10-01 00:00:00.000USDTBABYEDOG211802.065333764
    15
    2024-10-01 00:00:00.000USDCDAI361.608946319
    16
    2024-10-01 00:00:00.000USDC😂230.1821019609
    17
    2024-10-01 00:00:00.000USDTAPTOGE340.52141671070.6331237761
    18
    2024-10-01 00:00:00.000USDTAPC30.0030462086540.001908961705
    19
    2024-10-01 00:00:00.000USDCSUI30.006993991277
    20
    2024-10-01 00:00:00.000USDTFTZ20.000047108
    ...
    561
    37KB
    1s