Query editor
with token_addresses as (select address, symbol, name, 'ethereum' as blockchainfrom dune.ondo_team.result_ondo_assetswhere symbol != 'USDon'union allselect address_bnb as address, symbol, name, 'bnb' as blockchainfrom dune.ondo_team.result_ondo_assetswhere symbol != 'USDon'union allselect address_hype as address, symbol, name, 'hyperevm' as blockchainfrom dune.ondo_team.result_ondo_assetswhere symbol != 'USDon' and address_hype is not null),chains as (SELECT addressFROM UNNEST(split('{{chains}}', ',')) AS t(address)),logs as(select block_time, contract_address, topic0, topic1, topic2, topic3, data,tx_hash,tx_from, tx_to, 'ethereum' as blockchainfrom ethereum.logswhere 'ethereum' in (select * from chains)and block_date >= date '2025-07-01'union allselect block_time, contract_address, topic0, topic1, topic2, topic3, data,tx_hash,tx_from, tx_to, 'bnb' as blockchainfrom bnb.logswhere 'bnb' in (select * from chains)and block_date >= date '2025-10-01'union all-- HyperEVM: tokens emit only standard ERC20 Transfer/Approval events (verified 2026-05-08).-- Custom Ondo Mint/Redeem proxy (topic0=0xdfe4...) is NOT used on HyperEVM.-- This branch will return zero rows until/unless Ondo deploys the proxy here.-- To capture HyperEVM mint/burn volume, use Transfer-from-0x0 reconstruction-- (see TVL queries 5653710 / 6494838) and a price oracle separately.select block_time, contract_address, topic0, topic1, topic2, topic3, data,tx_hash,tx_from, tx_to, 'hyperevm' as blockchainfrom hyperevm.logswhere 'hyperevm' in (select * from chains)and block_date >= date '2026-05-01'and contract_address in (select address from token_addresses where blockchain = 'hyperevm')and topic0 = 0xdfe4debbd7bc491e9db43820916e30a4ef9490863fc22b1e79e2f76013901035),data as (select block_time, tx_from as user, blockchain,casewhen varbinary_to_uint256(varbinary_substring(data, 129, 32)) = 0 then 'Mint'when varbinary_to_uint256(varbinary_substring(data, 129, 32)) = 1 then 'Redeem'end as action,varbinary_ltrim(varbinary_substring(data, 161, 32)) as asset,varbinary_to_uint256(varbinary_substring(data, 193, 32))/1e18 as price,varbinary_to_uint256(varbinary_substring(data, 225, 32))/1e18 as quantity,(varbinary_to_uint256(varbinary_substring(data, 193, 32))/1e18) * (varbinary_to_uint256(varbinary_substring(data, 225, 32))/1e18) as volume, tx_hashfrom logswhere topic0 = 0xdfe4debbd7bc491e9db43820916e30a4ef9490863fc22b1e79e2f76013901035),raw as (select date_trunc('day', block_time) as day, d.blockchain, cast(user as varchar) as user, action, symbol, quantity, d.price, volume, cast(tx_hash as varchar) as tx_hashfrom data dleft join token_addresses q