defi__joshprice impact of large trades
Updated 2025-04-08Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
›
⌄
WITH large_swaps AS (
SELECT
t.block_timestamp,
t.tx_hash,
t.symbol,
t.amount_usd,
t.amount,
p.price as token_price
FROM ronin.core.ez_token_transfers t
LEFT JOIN ronin.price.ez_prices_hourly p
ON t.contract_address = p.token_address
AND DATE_TRUNC('hour', t.block_timestamp) = p.hour
WHERE t.block_timestamp >= DATEADD('day', -30, CURRENT_TIMESTAMP)
AND t.origin_to_address = '0x7d0556d55ca1a92708681e2e231733ebd922597d'
AND t.amount_usd > 10000 -- Focus on large trades
)
SELECT
symbol as "token",
COUNT(*) as "number of large trades",
AVG(amount_usd) as "average trade size (USD)",
MAX(amount_usd) as "largest_trade_usd"
FROM large_swaps
GROUP BY 1
ORDER BY 2 DESC;
QueryRunArchived: QueryRun has been archived