The README and NatSpec describe `withdraw()` as the owner's post-hunt withdrawal path for leftover funds.
The implementation omits any ownership check, so any external account can trigger the withdrawal once `claimsCount >= MAX_TREASURES`. Although the funds still go to `owner`, the access-control boundary described by the project is not enforced on-chain.
Likelihood: MEDIUM
Any arbitrary account can call `withdraw()` as soon as the treasure-count condition is satisfied and the contract later receives additional ETH.
The PoC demonstrates the behavior with no privileged access by letting an attacker trigger the final withdrawal after the owner replenishes the contract.
Impact: MEDIUM
The contract does not enforce the access-control model communicated to users and integrators.
Unauthorized callers can force protocol settlement timing and trigger owner-only operational flows unexpectedly.
Paste this test function to test file and run it
Use the modifier onlyOwner that has been defined in this function
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.