Query editor
/* ===========================================================================VB-001 PATTERN HUNTER -- "signed payload does not bind the account"---------------------------------------------------------------------------The Garden HTLC bug generalised:Initiate(address redeemer,uint256 timelock,uint256 amount,bytes32 secretHash)-- `initiator`, the account whose tokens move, is NOT in the structWhen the signed payload omits the subject account, the resulting EIP-712digest is IDENTICAL no matter which account the protocol later checks itagainst. SignatureChecker then falls through to ERC-1271 for any addresswith code, so one signature validates for every account honouring the key.That leaves a decisive on-chain fingerprint:the same verifier contract asks the SAME digest of DIFFERENT accountsA correctly-bound payload cannot do this -- including `owner`/`from`/`account` in the struct makes the digest account-specific by construction.ERC-1271 call layout, isValidSignature(bytes32,bytes) = 0x1626ba7e1..4 selector5..36 hash (the digest)37..68 offset to bytes (0x40)69..100 signature length101.. signature bytesValid return is the magic value 0x1626ba7e.FALSE-POSITIVE CONTROL: a multisig legitimately asks several owners aboutone dataHash -- but it does so inside ONE transaction. A cross-accountreplay is a separate transaction, later. So we require the reuse to spanmore than one transaction, and report same-tx breadth separately.=========================================================================== */WITH erc1271 AS (SELECTt.block_time,t.tx_hash,t."from" AS verifier, -- protocol doing the checkt.to AS account, -- account being askedbytearray_substring(t.input, 5, 32) AS digest,bytearray_substring(t.input, 101,LEAST(CAST(bytearray_to_uint256(bytearray_substring(t.input, 69, 32)) AS INTEGER), 200)) 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) = 0x1626ba7e-- only count validations that actually PASSED (magic value returned)AND bytearray_substring(t.output, 1, 4) = 0x1626ba7e),/* one digest, several accounts, from the same verifier */digest_reuse AS (SELECTverifier,digest,