Query editor
-- ============================================================================-- ALL DeFi PROTOCOLS on HyperEVM — Per Protocol with % and Decimal Share-- % columns = protocol count / SUM of all protocol counts → sums to 100%-- ============================================================================WITH event_whitelist AS (SELECT LOWER(name) AS name FROM (VALUES('Supply'), ('Deposit'), ('Withdraw'), ('Withdrawal'),('Redeem'), ('Borrow'), ('Repay'), ('FlashLoan'),('Liquidation'), ('LiquidatePosition'), ('LiquidationCall'),('SupplyCollateral'), ('AccrueInterest'),('ReserveUsedAsCollateralEnabled'), ('ReserveUsedAsCollateralDisabled'),('ReserveDataUpdated'), ('BorrowRateUpdate'),('Swap'), ('AssetSwapped'), ('Swapped'), ('Exchange'), ('Routed'),('Mint'), ('Burn'), ('Collect'),('LiquidityAdded'), ('LiquidityRemoved'),('Enter'), ('Sync'), ('Poke'),('Stake'), ('Unstake'),('StakeReceived'), ('StakeRecorded'), ('Delegate'),('RewardsClaimed'), ('Claimed'), ('Distribute'),('Bridge'), ('BridgeInitiated'), ('BridgeCompleted'),('LiFiGenericSwapCompleted'), ('LiFiTransferStarted'),('UpdateLastTotalAssets'), ('UpdateLostAssets'),('SetAuthorization'), ('ShortcutExecuted'),('OrderPlaced'), ('OrderFilled'), ('OrderCancelled'),('BalanceTransfer'), ('RawAction'), ('L1OperationAggregated')) AS t(name)),excluded_namespaces AS (SELECT LOWER(name) AS name FROM (VALUES('whype'), ('usdt0'), ('khype'), ('sthype'),('usdhl')) AS t(name)),raw_interactions AS (SELECTc.namespace AS protocol,CAST(ld.block_time AS DATE) AS block_date,ld.tx_from AS user_addressFROM hyperevm.logs_decoded ldJOIN hyperevm.contracts cON ld.contract_address = c.addressJOIN event_whitelist wON LOWER(ld.event_name) = w.nameWHERE ld.tx_from IS NOT NULLAND c.namespace IS NOT NULLAND LOWER(c.namespace) NOT IN (SELECT name FROM excluded_namespaces)),protocol_first_seen AS (SELECTprotocol,user_address,MIN(block_date) AS first_active_dateFROM raw_interactionsGROUP BY protocol, user_address),max_date AS (SELECT MAX(block_date) AS latest_date FROM raw_interactions),per_protocol AS (SELECT