datavortexswap routes
    Updated 2025-05-04
    WITH sender_transactions as (
    select
    tx_hash,
    block_timestamp,
    old_owner_id as sender_address,
    amount_raw as sent_amount,
    token_id as sent_token
    from near.defi.fact_intents
    where log_event = 'mt_transfer'
    and RECEIPT_SUCCEEDED = TRUE
    qualify row_number() over (partition by tx_hash, log_index order by log_event_index desc) = 1
    ),
    receiver_transactions as (
    select
    tx_hash,
    block_timestamp,
    new_owner_id as receiver_address,
    token_id as received_token
    from near.defi.fact_intents
    where log_event = 'mt_transfer'
    and RECEIPT_SUCCEEDED = TRUE
    qualify row_number() over (partition by tx_hash, log_index order by log_event_index asc) = 1
    ),
    swap_details as (
    select
    s.tx_hash,
    s.block_timestamp,
    s.sender_address,
    s.sent_amount,
    split(s.sent_token, ':')[1] :: string as input_token,
    split(r.received_token, ':')[1] :: string as output_token
    from sender_transactions s
    left join receiver_transactions r using(tx_hash)
    where split(s.sent_token, ':')[1] :: string != split(r.received_token, ':')[1] :: string
    or r.received_token is null
    ),
    Last run: 16 days ago
    SWAP_PAIR
    TOTAL_SWAPS
    TOTAL_VOLUME_USD
    1
    ZEC-NEAR5839819645.793323028
    2
    NEAR-ZEC3697462030.511731441
    3
    AAVE-USDC359413308.30525918
    4
    USDC-AAVE359012248.098934319
    5
    BTC-USDC2285739171.1894042
    6
    USDC-BTC20801334745.54543218
    7
    NEAR-USDC2073884382.421093273
    8
    USDC-NEAR1892643130.456706186
    9
    USDC-USDT1604351811.248809918
    10
    XRP-USDC1496
    10
    339B
    7s