Query editor
-- IRYS Airdrop Sybil Detection Query-- Find claims where:-- 1. Claiming wallet has < 4 total transactions-- 2. Was funded by same wallet just before claim-- 3. Funder funded at least 5 wallets (sybil cluster)-- Sorted by biggest clusters first, then by claim amount within clusterWITH claims AS (SELECTbytearray_substring(topic1, 13, 20) AS claimer,CAST(bytearray_to_uint256(data) AS DOUBLE) / 1e18 AS claim_amount,tx_hash AS claim_tx_hash,block_number AS claim_block,block_time AS claim_timeFROM ethereum.logsWHEREcontract_address = 0x6f4aDC0f488d159d919f0001c27d3a6b8370d513AND topic0 = 0x286b28c8571c73086fa8d8852b677537690a70b51e1a76820fe50db64e127779AND block_number >= 23875673),claimer_tx_counts AS (SELECTc.claimer,c.claim_amount,c.claim_tx_hash,c.claim_block,c.claim_timeFROM claims cLEFT JOIN ethereum.transactions tON t."from" = c.claimerGROUP BY c.claimer, c.claim_amount, c.claim_tx_hash, c.claim_block, c.claim_timeHAVING COUNT(t.hash) < 4),funding_txs AS (SELECTctc.claimer,ctc.claim_amount,ctc.claim_tx_hash,ctc.claim_block,ctc.claim_time,t."from" AS funder_address,t.block_number AS funding_block,CAST(t.value AS DOUBLE) / 1e18 AS funding_amount,ROW_NUMBER() OVER (PARTITION BY ctc.claimerORDER BY t.block_number DESC) AS rnFROM claimer_tx_counts ctcINNER JOIN ethereum.transactions tON t."to" = ctc.claimerAND t.block_number < ctc.claim_blockAND t.value > UINT256 '0'AND t.success = true),recent_funding AS (SELECT * FROM funding_txs WHERE rn = 1),