The claim() function in contracts/src/TreasureHunt.sol lines 83-112
has no on-chain tracking of which proofs have been used. While the ZK
circuit binds proofs to recipients at the cryptographic level, the same
proof bytes could theoretically be submitted multiple times since there
is no usedProofs mapping to reject replayed proofs.
Likelihood:
Requires a valid ZK proof to attempt replay
ZK verification already rejects proofs bound to a different recipient
Impact:
Same proof could be submitted multiple times as defense-in-depth is missing
Adding proof tracking would close this theoretical vector completely
Low isolated impact but recommended as hardening measure
This test shows the contract has no mechanism to reject a previously
used proof. Without a usedProofs mapping, the same proof bytes can
be passed to claim() again with no on-chain rejection at the proof
level — only ZK verification and the double-claim check act as barriers.
Add a usedProofs mapping to track and reject replayed proof bytes.
This provides defense-in-depth independent of ZK verification logic.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.