Query editor
-- User interactions with outside contracts:-- All Benqi Finance contracts have been excluded-- All contracts that appear in multiple (ie., have more than one occurence given multiple names input into labels) as given one name for efficiency-- All contracts that lack a name are provided one via the case function-- All labels that are not provided by Dune are pulled directly from Snowtracewith users as(selectdistinct(minter) as userfrom benqi_finance_avalanche_c.QiErc20Delegate_evt_Mintunion allselectdistinct(redeemer) as userfrom benqi_finance_avalanche_c.QiErc20Delegate_evt_Redeemunion allselectdistinct(minter) as userfrom benqi_finance_avalanche_c.QiAvax_evt_Mintunion allselectdistinct(redeemer) as userfrom benqi_finance_avalanche_c.QiAvax_evt_Redeem)selectto, (casewhen to = 0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664 then 'Avalanche Bridge: USDC.e'when to = 0x82a85407bd612f52577909f4a58bfc6873f14da8 then 'Crabada: Game'when to = 0x188bed1968b795d5c9022f6a0bb5931ac4c18f00 then 'Trader Joe: Master Chef Joe V3'when to = 0x7761e2338b35bceb6bda6ce477ef012bde7ae611 then 'Chikn Farm: EGG Token'when to = 0x794a61358d6845594f94dc1db02a252b5b4814ad then 'Aave: Pool V3'else name end) as contract_name, count(distinct("from")) as total_users, count(distinct(hash)) as total_txsfrom avalanche_c.transactions ajoin users bon a."from" = b.userleft join labels.contracts con a.to = c.addresswhere date_trunc('month', a.block_time) >= now() - interval '1' yearand blockchain = 'avalanche_c'and name not like 'Benqi_finance%'group by 1, 2order by 4 desclimit 10