The claim function is intended to prevent users from claiming the same treasure multiple times by checking a claimed mapping. Under normal behavior, a successful claim should mark the specific treasure hash as "true" in the mapping and revert any future attempts using that same hash.
However, a critical logic error exists where the duplicate check and the storage update use different variables. The contract checks _treasureHash (an incorrect or undefined identifier) but updates the mapping using treasureHash (the actual function parameter).Describe the normal behavior in one or more sentences
Likelihood:
Reason 1 This vulnerability is present in the core claim logic and is triggered every time a user attempts to claim a reward.
Reason 2 The duplicate check always evaluates to false because the slot being checked is never the slot being written to.
Impact:
Impact 1 An attacker can completely drain the contract's ETH balance with only one legitimate treasure discovery.
Impact 2 A single valid ZK proof can be reused infinitely by a single participant.
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.