Kruys-Collinswily-emerald
    Updated 2024-09-10
    SELECT
    swaps.tx_hash,
    swaps.amount0_adjusted AS asset_quantity_traded,
    prices.price AS market_price,
    swaps.price_1_0 AS amm_price,
    (swaps.amount0_adjusted * (prices.price - swaps.price_1_0)) AS LVR
    FROM
    ethereum.uniswapv3.ez_swaps swaps
    JOIN
    crosschain.price.ez_prices_hourly AS prices
    ON
    swaps.token0_address = prices.token_address
    AND swaps.blockchain = prices.blockchain
    AND DATE_TRUNC('hour', swaps.block_timestamp) = prices.hour
    limit 100
    QueryRunArchived: QueryRun has been archived