Query editor
/* Ronin → Tornado Cash 出口:3ホップ集約点探索(軽量版)仮説(事前宣言): TC投入は4月型・5月型のみ=5月末完了。引出は06-01以降。期間: 2022-06-01 〜 2022-10-01契約除外: transactions の "from" は必ず EOA なので、契約は次のホップへ展開されず自動的に落ちる */WITH/* hop0: 100 ETH プールからの出金(内部送金なので traces が必要) */h0 AS (SELECT "to" AS addr,SUM(CAST(value AS DOUBLE)/1e18) AS ethFROM ethereum.tracesWHERE "from" = 0xa160cdab225685da1d56aa342ad8841c3b53f291AND call_type = 'call' AND successAND CAST(value AS DOUBLE)/1e18 BETWEEN 90 AND 100.01AND block_time >= TIMESTAMP '2022-06-01'AND block_time < TIMESTAMP '2022-10-01'GROUP BY 1HAVING SUM(CAST(value AS DOUBLE)/1e18) >= 2000),/* hop1 */h1 AS (SELECT tx."to" AS addr, SUM(CAST(tx.value AS DOUBLE)/1e18) AS ethFROM ethereum.transactions txJOIN h0 ON h0.addr = tx."from"WHERE tx.success AND tx.value > 0 AND tx."to" IS NOT NULLAND tx.block_time >= TIMESTAMP '2022-06-01'AND tx.block_time < TIMESTAMP '2022-10-01'GROUP BY 1HAVING SUM(CAST(tx.value AS DOUBLE)/1e18) >= 500ORDER BY 2 DESCLIMIT 150),/* hop2 */h2 AS (SELECT tx."to" AS addr, SUM(CAST(tx.value AS DOUBLE)/1e18) AS ethFROM ethereum.transactions txJOIN h1 ON h1.addr = tx."from"WHERE tx.success AND tx.value > 0 AND tx."to" IS NOT NULLAND tx.block_time >= TIMESTAMP '2022-06-01'AND tx.block_time < TIMESTAMP '2022-10-01'GROUP BY 1HAVING SUM(CAST(tx.value AS DOUBLE)/1e18) >= 500ORDER BY 2 DESCLIMIT 150),/* hop3: ここで集約が起きているか */h3 AS (SELECT tx."to" AS consolidation,COUNT(DISTINCT tx."from") AS n_src,COUNT(*) AS n_tx,SUM(CAST(tx.value AS DOUBLE)/1e18) AS eth_in,MIN(tx.block_time) AS first_in,MAX(tx.block_time) AS last_inFROM ethereum.transactions txJOIN h2 ON h2.addr = tx."from"WHERE tx.success AND tx.value > 0 AND tx."to" IS NOT NULL