Query editor
with token_addresses as (select address as contract_address, symbol, type_detail, name, type, price, 'ethereum' as blockchainfrom dune.ondo_team.result_ondo_assetswhere symbol != 'USDon'union allselect address_bnb as contract_address, symbol, type_detail, name, type, price, 'bnb' as blockchainfrom dune.ondo_team.result_ondo_assetswhere symbol != 'USDon'),chains as (SELECT addressFROM UNNEST(split('{{chains}}', ',')) AS t(address)),transfers_raw as (selectcontract_address,evt_tx_hash,evt_block_time,evt_block_date,"from","to",value,'ethereum' as blockchainfrom erc20_ethereum.evt_transferwhere evt_block_date >= date '2025-07-01'and contract_address in (select contract_address from token_addresses)and 'ethereum' in (select address from chains)union allselectcontract_address,evt_tx_hash,evt_block_time,evt_block_date,"from","to",value,'bnb' as blockchainfrom erc20_bnb.evt_transferwhere evt_block_date >= date '2025-10-01'and contract_address in (select contract_address from token_addresses)and 'bnb' in (select address from chains)),data as (select contract_address, blockchain,casewhen "from" = 0x0000000000000000000000000000000000000000 then value / 1e18when "to" = 0x0000000000000000000000000000000000000000 then -(cast(value as double) / 1e18)end as amountfrom transfers_raw),supply as (select t.symbol, t.name, t.type, t.type_detail, sum(d.amount) as supply, t.price, sum(d.amount) * t.price as tvl, round(sum(d.amount) * t.price, 2) as aum2