Query editor
-- Per-OApp LayerZero DVN usage over 90 days, with token enrichment.---- min_required_dvns = the security FLOOR (weakest config ever used in the window)-- avg_required_dvns = message-weighted average (what a typical message looks like)-- distinct_dvn_signers_90d = unique DVN operator addresses observed signing any message-- for this OApp in the window, pooled across required and optional positions.---- Token labels are resolved from two independent sources:-- 1. tokens.erc20 (Dune-curated, works when the OApp IS an ERC20 -- classic OFT pattern)-- 2. layerzero.transfers (LZ spell, works for lock-and-mint pools where the OApp holds tokens)-- We COALESCE in that order: prefer the independent ERC20 registry, fall back to the LZ spell.---- Manually-verified OApps (Kelp DAO, Lorenzo, Botanix, Berachain, StakeStone) are force-labeled.WITH labeled_oapps AS (SELECT oapp, label FROM (VALUES-- Kelp DAO (6 contracts)('0x85d456b2dff1fd8245387c0bfb64dfb700e98ef3', 'Kelp DAO'),('0x4186bfc76e2e237523cbc30fd220fe055156b41f', 'Kelp DAO'),('0x1bc71130a0e39942a7658878169764bbd8a45993', 'Kelp DAO'),('0x65421ba909200b81640d98b979d07487c9781b66', 'Kelp DAO'),('0xc430c78da6e4af49bd115f0329d154bb135f1363', 'Kelp DAO'),('0xc3eacf0612346366db554c991d7858716db09f58', 'Kelp DAO'),-- Lorenzo Protocol (stBTC OFT on Ethereum)('0x265c59dacaa6ac8f02d5a2fb29d717b964bb3520', 'Lorenzo Protocol (stBTC)'),-- Botanix (pBTC peg)('0x73395c71566dae34d5fad9d9f5f70a57298bddcb', 'Botanix (pBTC)'),-- Berachain native OFTs('0x4571ce79888396dee7a9733fdc11c310924e6231', 'Berachain (WBERA)'),('0x77e08c7fcfcf9a000b9b4a465d2321fb5bb328c2', 'Berachain (Bera-side)'),-- StakeStone family('0x0030cfc34904ec4faaf125620a6b52aaac6028af', 'StakeStone'),('0x8362930fee73147b4ed0f8acc43bf94814b83cd5', 'StakeStone (Base-inferred)'),('0xa7dfd191b310b7201976bed0ba80c043387587a4', 'StakeStone (Base-inferred)'),('0x1d5efe49772cab2c8cfa52ae0dee549ba72ebe0d', 'StakeStone (Base-inferred)')) AS t(oapp, label)),recent_dvn_usage AS (SELECT'0x' || to_hex(evt_tx_hash) AS tx_hash_hex,chain,cardinality(requiredDVNs) AS required_dvn_count,cardinality(optionalDVNs) AS optional_dvn_count,requiredDVNs,optionalDVNsFROM layerzero_multichain.senduln302_evt_dvnfeepaidWHERE evt_block_date >= CURRENT_DATE - INTERVAL '90' DAY),messages_labeled AS (SELECTLOWER(tx_hash_source) AS tx_hash_source,project,LOWER(source_contract) AS oapp_address,source_chainFROM layerzero.messagesWHERE ts_source >= NOW() - INTERVAL '90' DAY),-- Source 1: Dune's tokens.erc20 registry (independent of LayerZero spells)erc20_lookup AS (SELECT