BlockTrackerswap (main query) uniswap [Oolong swap router)
    Updated 2025-03-02
    with uniswap_V2 as (
    with pool_created as (
    select
    contract_address,
    REGEXP_SUBSTR_ALL(SUBSTR(data, 3, len(data)), '.{64}') as segmented_data,
    lower('0x' || substr(topics[1]::string, 27, 40) :: string) as token0,
    lower('0x' || substr(topics[2]::string, 27, 40) :: string) as token1,
    lower('0x' || substr(segmented_data[0]::string, 25, 40 ) :: string) as pool_address
    from boba.core.fact_event_logs
    WHERE topics[0] = '0x0d3648bd0f6ba80134a33ba9275ac585d9d315f0ad8355cddefde31afa28d0e9'
    and TX_SUCCEEDED
    )
    ,
    swap as (
    select
    block_timestamp,
    block_number,
    origin_from_address,
    origin_to_address,
    ORIGIN_FUNCTION_SIGNATURE,
    tx_hash,
    event_index,
    contract_address,
    lower('0x' || substr(topics[1]::string, 27, 40) :: string) as sender,
    lower('0x' || substr(topics[2]::string, 27, 40) :: string) as address_to,
    REGEXP_SUBSTR_ALL(SUBSTR(data, 3, len(data)), '.{64}') as segmented_data,
    livequery.utils.udf_hex_to_int(segmented_data[0]::string) :: int as amount0In,
    livequery.utils.udf_hex_to_int(segmented_data[1]::string) :: int as amount1In,
    livequery.utils.udf_hex_to_int(segmented_data[2]::string) :: int as amount0Out,
    livequery.utils.udf_hex_to_int(segmented_data[3]::string) :: int as amount1Out
    from boba.core.fact_event_logs
    where topics[0]::string = '0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822'
    and TX_SUCCEEDED
    )

    , result as (
    Last run: 18 days ago
    DATE
    N_SWAPS
    CUM_SWAPS
    N_SWAPPERS
    VOLUME_USD
    CUM_VOLUME
    D_AVG_VOLUME
    AVG_VOLUME_USD
    1
    2025-03-01 00:00:00.00061980112632.845615136950244012.75353823176683.2378912105.474269189
    2
    2025-02-01 00:00:00.000135619800525236475.131635085950243379.90792323756084.4976981174.649284812
    3
    2025-01-01 00:00:00.000105419664942183850.832123198950006904.77628824359151.4045202170.865085616
    4
    2024-12-01 00:00:00.000176919559559394678.327421238949823053.94416524995343.5248464218.416340576
    5
    2024-11-01 00:00:00.0002611193826134349950.543364627949428375.61674425660226.3680201112.850868547
    6
    2024-10-01 00:00:00.000118619121583108801.8750913949078425.07337926363289.585371681.074422572
    7
    2024-09-01 00:00:00.000120119002983170504.86479303948969623.19828827113417.8056654138.960770002
    8
    2024-08-01 00:00:00.00099218882863144243.715375323948799118.33349527905856.4215734142.252184788
    9
    2024-07-01 00:00:00.00094718783686185137.526935429948654874.6181228747117.4126703186.255057279
    10
    2024-06-01 00:00:00.000769186889136138230.729806565948469737.09118429639679.2840995166.743944278
    11
    2024-05-01 00:00:00.00088918612085172007.464449736948331506.36137830591338.9148831179.924125993
    12
    2024-04-01 00:00:00.0001013185231158280703.415577252948159498.89692831605316.6298976228.399849941
    13
    2024-03-01 00:00:00.00016921842181661188356.6983505947878795.48135132685475.7062535628.427656452
    14
    2024-02-01 00:00:00.00027318252686103892.170640157946690438.78333810372.8136786286.204326832
    15
    2024-01-01 00:00:00.000393182253102136650.911732064946586546.6123635058760.985643261.783355809
    16
    2023-12-01 00:00:00.000637181860148319641.155389019946449895.70062836401919.0654088395.106496155
    17
    2023-11-01 00:00:00.0001861812238971603.273006122946130254.54523937845210.1818096269.185236865
    18
    2023-10-01 00:00:00.0002131810378334919.634604739946058651.27223339419110.4696764132.2713432
    19
    2023-09-01 00:00:00.0001451808246319064.772557658946023731.63762841131466.592940395.323862788
    20
    2023-08-01 00:00:00.0001491806796924917.394296423946004666.8650743000212.1302305126.484235007
    41
    4KB
    11s