Query editor
with tok as (select contract_address, max(symbol) as symbol, max(decimals) as decimalsfrom tokens.erc20 where blockchain='ethereum' group by 1),cat_map(symbol, category) as (values('WETH','ETH & LST'),('stETH','ETH & LST'),('wstETH','ETH & LST'),('weETH','ETH & LST'),('osETH','ETH & LST'),('rETH','ETH & LST'),('cbETH','ETH & LST'),('ETHx','ETH & LST'),('ezETH','ETH & LST'),('rsETH','ETH & LST'),('tETH','ETH & LST'),('USDT','Stablecoins'),('USDC','Stablecoins'),('GHO','Stablecoins'),('USDS','Stablecoins'),('DAI','Stablecoins'),('USDe','Stablecoins'),('PYUSD','Stablecoins'),('USDG','Stablecoins'),('crvUSD','Stablecoins'),('RLUSD','Stablecoins'),('sUSDe','Stablecoins'),('USDtb','Stablecoins'),('sDAI','Stablecoins'),('WBTC','BTC wrappers'),('cbBTC','BTC wrappers'),('tBTC','BTC wrappers'),('LBTC','BTC wrappers'),('BTC.b','BTC wrappers'),('eBTC','BTC wrappers'),('FBTC','BTC wrappers'),('kBTC','BTC wrappers'),('UNI','DeFi majors'),('AAVE','DeFi majors'),('LINK','DeFi majors'),('LDO','DeFi majors'),('ONDO','DeFi majors'),('WLD','DeFi majors'),('ENA','DeFi majors'),('DEXE','DeFi majors'),('WLFI','DeFi majors'),('SKY','DeFi majors'),('PAXG','RWA'),('XAUt','RWA'),('NVDAon','RWA'),('TSLAon','RWA'),('AAPLon','RWA'),('SPYon','RWA'),('METAon','RWA'),('AMZNon','RWA'),('CRCLon','RWA'),('GOOGLon','RWA'),('QQQon','RWA'),('NVDAx','RWA'),('TSLAx','RWA'),('AAPLx','RWA'),('SPYx','RWA'),('METAx','RWA'),('AMZNx','RWA'),('syrupUSDC','RWA'),('syrupUSDT','RWA'),('USDY','RWA')),rewards(category, daily_usd) as (values('ETH & LST',5735.0),('Stablecoins',4508.0),('BTC wrappers',2254.0),('DeFi majors',2104.0),('RWA',300.0)),px_day as (select date(minute) as day, contract_address, avg(price) as pricefrom prices.usd where blockchain='ethereum' and minute >= date '2026-07-19' group by 1,2),px_min as (select minute, contract_address, pricefrom prices.usd where blockchain='ethereum' and minute >= date '2026-07-19'),ships as (select output_strategyHash as strategy_hash, bytearray_substring(strategy,45,20) as maker,call_block_time as shipped_at, tokens, amounts,100.0*(power(cast(bytearray_to_uint256(bytearray_substring(strategy,243,32)) as double)/nullif(cast(bytearray_to_uint256(bytearray_substring(strategy,211,32)) as double),0),2)-1) as range_width_pct,cast(bytearray_to_uint256(bytearray_substring(strategy,277,4)) as double)/1e7 as fee_pctfrom oneinch_multichain.aquarouter_call_shipwhere chain='ethereum' and call_successand bytearray_substring(strategy,161,2)=0x2114 and cardinality(tokens)>=2),ship_meta as (select s.strategy_hash, s.maker, s.shipped_at, s.tokens, s.amounts, s.range_width_pct, s.fee_pct,coalesce(a.symbol,'unknown')||' / '||coalesce(b.symbol,'unknown') as pair,case when a.symbol='1INCH' then b.symbol else a.symbol end as counter_symfrom ships sleft join tok a on a.contract_address=s.tokens[1]left join tok b on b.contract_address=s.tokens[2]),categorised as (select m.*, coalesce(c.category,'Not incentivised') as categoryfrom ship_meta mleft join cat_map c on c.symbol = case when m.counter_sym like 'stataEth%' then substr(m.counter_sym,9)when m.counter_sym like 'aEth%' then substr(m.counter_sym,5)else m.counter_sym end),committed as (select s.strategy_hash, sum(cast(u.amount as double)/power(10,coalesce(t.decimals,18))*p.price) as committed_usdfrom ships s cross join unnest(s.tokens,s.amounts) as u(token,amount)left join tok t on t.contract_address=u.tokenleft join px_day p on p.day=date(s.shipped_at) and p.contract_address=u.tokengroup by 1),docks as (select strategyHash as strategy_hash, min(evt_block_time) as docked_atfrom oneinch_multichain.aquarouter_evt_docked where chain='ethereum' group by 1),swaps as (select evt_tx_hash as tx_hash, evt_block_time as bt, maker, tokenIn as ti, tokenOut as to_, amountIn as ai, amountOut as aofrom oneinch_ethereum.aquaswapvmrouter_evt_swapped where evt_block_time >= date '2026-07-19'),attributed as (select s.bt, s.ti, s.to_, s.ai, s.ao, p.strategyHash as strategy_hashfrom swaps s join oneinch_multichain.aquarouter_evt_pushed p