The mintFaucetTokens function is restricted to the owner, but it allows the owner to specify any address as the recipient — with only a check that the address must be address(this):
However, this check is redundant and misleading:
-The function accepts a to parameter, but it must always be the contract itself.
-This creates confusion and opens the door for future misuse if the check is removed or bypassed.
-It also violates the principle of least privilege — the function should not accept a parameter at all if only one value is valid.
Impact:
-Confusing and misleading API design.
-Potential for future misuse if the check is weakened.
-Increases audit surface and complexity.
-Violates clarity and minimalism in secure contract design.
Proof of Concept:
Recommended Mitigation:
Simplify the function by removing the to parameter entirely:
This improves clarity, reduces risk, and enforces correct usage by design.
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.