Query editor
-- Panel 3: Wallet linkability-- The first gas deposit into a wallet links it to whoever sent it. Often that is an exchange account with a name on it.-- Source: addresses_events_{chain}.first_funded_by (Spellbook, full history, native transfers).-- Contract wallets (common for trading bots) also get a "deployed by" row from creation_traces.with p as (select from_hex(replace(lower(trim('{{wallet}}')), '0x', '')) as w),ff as (select blockchain, first_funded_by, first_funding_executed_by, amount, amount_usd, block_time, tx_hashfrom addresses_events_bnb.first_funded_by where address = (select w from p)union allselect blockchain, first_funded_by, first_funding_executed_by, amount, amount_usd, block_time, tx_hashfrom addresses_events_arbitrum.first_funded_by where address = (select w from p)union allselect blockchain, first_funded_by, first_funding_executed_by, amount, amount_usd, block_time, tx_hashfrom addresses_events_base.first_funded_by where address = (select w from p)),created as (select blockchain, min(block_time) as created_at, min_by(deployer, block_time) as deployerfrom (select 'bnb' as blockchain, block_time, "from" as deployer from bnb.creation_traceswhere block_month >= date '2022-01-01' and address = (select w from p)union allselect 'arbitrum', block_time, "from" from arbitrum.creation_traceswhere block_month >= date '2022-01-01' and address = (select w from p)union allselect 'base', block_time, "from" from base.creation_traceswhere block_month >= date '2022-01-01' and address = (select w from p))group by 1),cex as (select blockchain, address, min(name) as cex_namefrom labels.cexwhere blockchain in ('bnb','arbitrum','base')group by 1, 2),owners as (select blockchain, address, min(coalesce(custody_owner, account_owner)) as owner_namefrom labels.owner_addresseswhere blockchain in ('bnb','arbitrum','base')group by 1, 2),-- how many of the three chains were first funded by the same address (cross chain link)funder_chains as (select first_funded_by, count(distinct blockchain) as chains_fundedfrom ffgroup by 1),funding_rows as (selectf.blockchain,'first gas deposit' as link_type,f.block_time as linked_at,f.first_funded_by as linked_address,coalesce(c1.cex_name, o1.owner_name, 'unlabeled') as linked_label,case when c1.cex_name is not null then 'CEX'when o1.owner_name is not null then 'labeled entity'else 'unlabeled' end as linked_type,f.first_funding_executed_by as executed_by,