Location: contracts/src/TreasureHunt.sol:53-56
The modifier is declared but unused
Instead, fund, pause, unpause, updateVerifier, and emergencyWithdraw each check againmsg.sender == owner inline with a little bit different error strings, duplicating the logic five times.
Likelihood: Low the check is present
Impact: Low
Grepping the contract shows the duplication clearly:
Expected output:
Five redundant copies of the same check outside the declared modifier.
Apply the modifier to every admin function and remove the inline checks
Do the same for pause, unpause, updateVerifier, emergencyWithdraw, and withdraw.
The `withdraw()` function is intended as an owner-only post-hunt recovery function, but the implementation does not actually enforce any ownership check before transferring the full remaining balance to owner. The function only requires that `claimsCount >= MAX_TREASURES` and that the contract balance is nonzero, after which it sends all ETH to the stored owner address regardless of who called the function. Therefore, the access control on the function itself is incomplete because any external account can trigger the withdrawal path once the hunt is considered over.
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.