Merkle leaf hashes should be calculated consistently using proper ABI encoding to ensure proof verification works correctly.
The script assumes abi.encode(bytes32[]) always produces exactly 64 bytes of prefix (offset + length), but this can vary based on Solidity version and array contents.
Likelihood:
Occurs when ABI encoding format doesn't match the 64-byte assumption
Solidity compiler optimizations can change encoding structure
Impact:
Invalid Merkle leaf hashes lead to proof verification failures
All users unable to claim despite having correct data
Encode Alice's data [bytes32(uint160(alice)), bytes32(1)] using abi.encode(data) then apply ltrim64 - if the compiler generates different offset lengths (not exactly 64 bytes), the resulting leaf hash won't match 0x51c4b9a3cc313d7d7325f2d5d9e782a5a484e56a38947ab7eea7297ec86ff138 from output.json, breaking all proof verifications.
Replace dynamic encoding with direct packed encoding: leafs[i] = keccak256(abi.encodePacked(keccak256(abi.encodePacked(data[0], data[1])))) to eliminate offset assumptions and ensure consistent hashing across compiler versions.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.