TreasureHunt.withdraw() at line 224 gates on claimsCount >= MAX_TREASURES (ten). With the separate critical dedup bug patched so that claimed[h] actually fires, honest play cannot exceed nine successful claims because ALLOWED_TREASURE_HASHES has only nine distinct entries (see the separate finding on the index 8/9 duplicate). The 10 ETH residual prize plus any donations then sit stranded; the only recovery is pause() + emergencyWithdraw, which cancels the hunt.
Likelihood: certain the moment the dedup bug is patched in isolation. Impact: 10 ETH of prize plus any donations frozen; owner forced to cancel the hunt to recover. Dependent finding: masked as long as the dedup bug is live (a single replay reaches claimsCount == 10 trivially).
Primary fix: correct the circuit duplicate (separate finding) so ten distinct hashes exist and honest play can legitimately reach ten claims.
Defence in depth: loosen the gate to something the contract can observe, for example a grace period after the last claim, and add the missing onlyOwner:
The issue stems from a mismatch between the circuit and the contract’s economic assumptions: the Solidity contract is configured for `MAX_TREASURES = 10` and only allows the owner to call `withdraw()` once `claimsCount >= MAX_TREASURES`, while the Noir circuit’s baked-in `ALLOWED_TREASURE_HASHES` array does not actually contain ten distinct treasures because one hash is duplicated and another expected hash is missing. As a result, under the intended one-claim-per-treasure design described in the README, there are only nine uniquely claimable treasures even though the system is funded and accounted as if ten rewards can be legitimately redeemed. That creates two linked consequences from the same root cause: first, one treasure is effectively unclaimable because no valid proof can ever be generated for the missing allowed hash, and second, the normal “hunt over” withdrawal path becomes bricked because honest participants can never reach ten legitimate unique claims, leaving the post-hunt fund recovery logic via `withdraw` function permanently unreachable. The owner can still intervene through the emergency path.
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.