crypto_gostAptos Ondo USDY Multisig Mint-Burn copy
    Updated 2024-11-29
    -- forked from whaen / Aptos Ondo USDY Multisig Mint-Burn @ https://flipsidecrypto.xyz/whaen/q/hz1FyeRKDWZX/aptos-ondo-usdy-multisig-mint-burn

    with
    -- SWAPS START --
    usdy_swaps as (
    -- swaps on animeswap, auxexchange, batswap, cellana, cetus, hippo, liquidswap, pancake, sushi, thala, and tsunami.
    select
    block_timestamp,
    tx_hash,
    platform,
    swapper as user_address,
    symbol_in::string as symbol_in,
    symbol_out::string as symbol_out,
    amount_in_unadj,
    amount_in,
    amount_in_usd,
    amount_out_unadj,
    amount_out,
    amount_out_usd
    from aptos.defi.ez_dex_swaps
    where token_in = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC'
    or token_out = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC'
    ),
    usdy_related_raw_tx_xswaps as (
    select distinct tx_hash
    from aptos.core.fact_transfers
    where token_address = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC'
    and tx_hash not in (select distinct tx_hash from aptos.defi.ez_dex_swaps where token_in = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC' or token_out = '0xf22bede237a07e121b56d91a491eb7bcdfd1f5907926a9e58338f964a01b17fa::asset::USDC')
    and success = 'true'
    order by tx_hash
    ),
    aggr_swap as (
    -- kana router
    select
    ts.*,
    amount_out_unadj/pow(10,coalesce(pr.decimals, 6)) as amount_out,
    Last run: 3 months ago
    Date
    SUM_AMOUNT
    $USDC supply
    1
    2024-11-15 00:00:00.000201802000672794727.854435
    2
    2024-10-26 00:00:00.00018692745.581501470992727.854435
    3
    2024-10-06 00:00:00.0006496817.500513452299982.272934
    4
    2024-09-28 00:00:00.000135748355.845244445803164.772421
    5
    2024-08-08 00:00:00.0002544936.166049310054808.927177
    6
    2024-08-02 00:00:00.000289214992.242896307509872.761128
    7
    2024-07-24 00:00:00.00018294349.84335218294880.518232
    8
    2024-02-07 00:00:00.000530.67488530.67488
    8
    469B
    88s