rezarwzBlast Price on DEXs vs. Claimed Token Amount
    Updated 2024-12-09
    with dex_price as (
    SELECT
    date,
    median(price) as m_price
    from
    (
    SELECT
    date_trunc('hour', to0.block_timestamp) as date,
    to0.amount_usd,
    to1.amount as token_amount,
    to0.amount_usd / to1.amount as price
    FROM
    blast.core.ez_token_transfers to0
    INNER join blast.core.ez_token_transfers to1 on to0.tx_hash = to1.tx_hash
    inner join blast.core.fact_transactions fa on fa.tx_hash = to0.tx_hash
    WHERE
    to0.CONTRACT_ADDRESS in (
    '0x4300000000000000000000000000000000000004',
    '0x4300000000000000000000000000000000000003'
    )
    and to1.CONTRACT_ADDRESS = '0xb1a5700fa2358173fe465e6ea4ff52e36e88e2ad'
    and (to0.ORIGIN_TO_ADDRESS = to0.FROM_Address)
    and (to1.origin_from_address = to1.to_Address)
    and to0.amount_usd != 0
    and to0.amount_usd is not null
    and to1.amount != 0
    and to1.amount is not null
    and fa.to_address='0x337827814155ecbf24d20231fca4444f530c0555'
    and fa.origin_function_signature = '0xac9650d8'
    and fa.STATUS = 'SUCCESS'
    )
    group by
    1
    ),
    all_claims as (
    SELECT
    QueryRunArchived: QueryRun has been archived