Query editor
-- Ark official trading activity from ArkHook SwapObserved events plus Dune DEX pricing.WITH swap_observed AS (SELECTblock_time,block_number,tx_hash,"index" AS evt_index,poolId AS pool_id,sender,sellsArk AS sells_ark,CAST(buyVolume AS DOUBLE) / 1e18 AS buy_volume_ark,CAST(sellVolume AS DOUBLE) / 1e18 AS sell_volume_ark,CAST(feeAmount AS DOUBLE) / 1e18 AS fee_amount,feeAsset AS fee_asset,feeBps AS fee_bps,tickAfter AS tick_after,liquidityFROM TABLE (decode_evm_event (abi => '{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"poolId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"bool","name":"sellsArk","type":"bool"},{"indexed":false,"internalType":"uint256","name":"buyVolume","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sellVolume","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"address","name":"feeAsset","type":"address"},{"indexed":false,"internalType":"uint16","name":"feeBps","type":"uint16"},{"indexed":false,"internalType":"int24","name":"tickAfter","type":"int24"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"}],"name":"SwapObserved","type":"event"}',input => TABLE (SELECT *FROM ethereum.logsWHERE contract_address = 0x30ca6F7B31B65B7977bd3991c532cE255bfF0044AND topic0 = 0x5adbe36bbccbff9f2c7140a2698e069ce4ed462441bd61c70415e8db4a2477c8AND block_number >= 25100064)))),dex_trades AS (SELECTblock_time,block_number,tx_hash,project,version,CASEWHEN token_bought_address = 0x94faCf7455D18631c68f999965DcC714F17e8568 THEN 'buy'ELSE 'sell'END AS side,CASEWHEN token_bought_address = 0x94faCf7455D18631c68f999965DcC714F17e8568 THEN token_bought_amountELSE token_sold_amountEND AS ark_amount,amount_usd,amount_usd / NULLIF(CASEWHEN token_bought_address = 0x94faCf7455D18631c68f999965DcC714F17e8568 THEN token_bought_amountELSE token_sold_amountEND,0) AS ark_price_usdFROM dex.tradesWHERE blockchain = 'ethereum'AND block_number >= 25100064AND block_month >= DATE '2026-05-01'AND (token_bought_address = 0x94faCf7455D18631c68f999965DcC714F17e8568