ali_lifiBase - Collateral Swap
    Updated 2025-01-15
    WITH
    same_chain_txns as (
    SELECT a.*, 'Arbitrum' as chain FROM arbitrum.core.ez_decoded_event_logs a, arbitrum.core.ez_decoded_event_logs b, arbitrum.core.ez_decoded_event_logs c
    WHERE a.block_timestamp between current_date -31 AND current_date-1
    AND b.block_timestamp between current_date -31 AND current_date-1
    -- AND a.origin_to_address = '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    AND a.tx_hash = b.tx_hash and a.tx_hash = c.tx_hash
    AND a.event_name = 'LiFiGenericSwapCompleted'
    AND b.event_name = 'ReserveUsedAsCollateralEnabled' -- in ('ReserveUsedAsCollateralEnabled', 'ReserveUsedAsCollateralDisabled')
    AND c.event_name = 'ReserveUsedAsCollateralDisabled' --in ('ReserveUsedAsCollateralEnabled', 'ReserveUsedAsCollateralDisabled')
    UNION ALL
    SELECT a.*, 'OP' as chain FROM optimism.core.ez_decoded_event_logs a,optimism.core.ez_decoded_event_logs b,optimism.core.ez_decoded_event_logs c
    WHERE a.block_timestamp between current_date -31 AND current_date-1
    AND b.block_timestamp between current_date -31 AND current_date-1
    -- AND a.origin_to_address = '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    AND a.tx_hash = b.tx_hash and a.tx_hash = c.tx_hash
    and a.event_name = 'LiFiGenericSwapCompleted'
    AND b.event_name = 'ReserveUsedAsCollateralEnabled'
    AND c.event_name = 'ReserveUsedAsCollateralDisabled'
    UNION ALL
    SELECT a.*, 'BSC' as chain FROM bsc.core.ez_decoded_event_logs a, bsc.core.ez_decoded_event_logs b , bsc.core.ez_decoded_event_logs c
    WHERE a.block_timestamp between current_date -31 AND current_date-1
    AND b.block_timestamp between current_date -31 AND current_date-1
    -- AND a.origin_to_address = '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    AND a.tx_hash = b.tx_hash and a.tx_hash = c.tx_hash
    and a.event_name = 'LiFiGenericSwapCompleted'
    AND b.event_name = 'ReserveUsedAsCollateralEnabled'
    AND c.event_name = 'ReserveUsedAsCollateralDisabled'
    UNION ALL
    SELECT a.*, 'BASE' as chain FROM base.core.ez_decoded_event_logs a, base.core.ez_decoded_event_logs b, base.core.ez_decoded_event_logs c
    WHERE a.block_timestamp between current_date -31 AND current_date-1
    AND b.block_timestamp between current_date -31 AND current_date-1
    -- AND a.origin_to_address = '0x1231deb6f5749ef6ce6943a275a1d3e7486f4eae'
    AND a.tx_hash = b.tx_hash and a.tx_hash = c.tx_hash
    and a.event_name = 'LiFiGenericSwapCompleted'
    AND b.event_name = 'ReserveUsedAsCollateralEnabled'
    Last run: 27 days ago
    CHAIN
    INTEGRATOR
    N_TXNS
    N_USERS
    VOLUME
    1
    Arbitrum
    layer3
    1119.99978
    2
    BASE
    Web3Academy
    3338.692743489
    3
    Polygon
    safepal
    241122390.008904681
    4
    Polygon
    rebalancer
    411251.223365786
    5
    BASE
    rebalancer
    211.704471853
    6
    BASE
    VOOI
    110.01363460954
    7
    Polygon
    transak
    513032.631860724
    8
    Ethereum
    exodusus
    1129739.737908696
    9
    Avalanche
    the-standard
    112799.7956
    10
    Arbitrum
    rebalancer
    312.107637798
    11
    Polygon
    zapper
    11135.470518274
    12
    BASE
    blockscout
    110
    13
    Polygon
    kucoin
    116485.527604708
    14
    Polygon
    exodusus
    653445.228612438
    15
    Polygon
    offramp
    210
    16
    Ethereum
    lifi-api
    221776.72956768
    17
    BASE
    folks-finance
    101038.230985082
    18
    Polygon
    dca-app
    51361.756821
    19
    BASE
    heyelsa
    331.62404487
    20
    BASE
    ionic
    113.34862
    51
    2KB
    249s