Query editor
/* ===========================================================================VB-001 HUNTER v3 -- identical signature bytes honoured by multiple accounts---------------------------------------------------------------------------Goal: find contracts across Ethereum with the Garden HTLC VB-001 shape --a signed payload that does not bind the account whose funds move, so onesignature validates for every account honouring the signing key.WHY THIS SIGNAL: a correctly-bound EIP-712 payload includes owner/from/account, making the digest account-specific by construction. If the SAMESIGNATURE BYTES are accepted for DIFFERENT accounts, the payload does notbind the account.TWO FALSE-POSITIVE MODES FOUND AND CONTROLLED FOR:1. Shared message, independently signed. Many users each sign one commonmessage (terms acceptance, whitelist attestation). Produces "same digest,many accounts" but distinct_signatures == distinct_accounts. Grouping onthe SIGNATURE rather than the digest removes it.2. Degenerate signatures. Some accounts implement isValidSignature to accepta 1-2 byte flag (0x01, 0x1212) rather than a real signature -- observed onUSDC (638 accounts), Permit2 (8) and Pendle (5). These collide triviallyand are not cryptographic evidence of anything. Excluded by requiring>= 65 bytes, the minimum for a real ECDSA signature.An earlier revision also truncated signatures to 200 bytes, which madeSafe-style 130/195/544/640/736-byte blobs collide; signatures are nowcompared IN FULL.ERC-1271 isValidSignature(bytes32,bytes) = 0x1626ba7e1..4 selector | 5..36 hash | 37..68 offset | 69..100 length | 101.. sigMagic return value 0x1626ba7e means the account ACCEPTED it.Surviving hits still require source review: a shared operator signaturedeliberately honoured by several accounts of one controller is legitimate.The query narrows the field; it does not by itself prove a vulnerability.=========================================================================== */WITH erc1271 AS (SELECTt.block_time,t.tx_hash,t."from" AS verifier,t.to AS account,bytearray_substring(t.input, 5, 32) AS digest,bytearray_substring(t.input, 101,CAST(bytearray_to_uint256(bytearray_substring(t.input, 69, 32)) AS INTEGER)) AS signatureFROM ethereum.traces tWHERE t.block_date >= DATE '{{start_date}}'AND t.call_type = 'staticcall'AND t.successAND length(t.input) >= 101AND bytearray_substring(t.input, 1, 4) = 0x1626ba7eAND bytearray_substring(t.output, 1, 4) = 0x1626ba7e-- real ECDSA signature or longer; excludes 1-2 byte flag "signatures"AND bytearray_to_uint256(bytearray_substring(t.input, 69, 32)) BETWEEN 65 AND 4096AND length(t.input) >= 100 + CAST(bytearray_to_uint256(bytearray_substring(t.input, 69, 32)) AS INTEGER))