The mintFaucetTokens() function includes an address parameter to, suggesting that tokens can be minted to any arbitrary address.
However, the function immediately checks whether to != address(this) and reverts if true — meaning the only valid argument is the contract’s own address.This makes the to parameter redundant and misleading, as the function effectively behaves as a fixed self-minting function for the faucet contract only.
Likelihood: Medium
| Factor | Observation | Likelihood Influence |
|---|---|---|
| Access Level | Only callable by the owner | Low |
| Exploitability | Cannot be exploited for gain | Low |
| Developer Confusion | Likely due to misleading API | Medium |
| Usage Frequency | Administrative, rarely used | Low |
| Code Clarity | Decreases due to redundant argument | Medium |
Impact: Low
| Impact Area | Description |
|---|---|
| Functional | No functional exploit or token loss — faucet still operates normally. |
| Code Quality | Redundant argument introduces unnecessary complexity and confusion. |
| Maintainability | Misleading parameter may cause developer misunderstanding or incorrect assumptions. |
| Auditability | Lowers readability and increases chance of oversight during audits. |
| User Impact | None for end users — affects internal maintainers only. |
| Step | Input | Expected Result |
|---|---|---|
| 1️⃣ | to = randomAddress |
Reverts with RaiseBoxFaucet_MiningToNonContractAddressFailed() |
| 2️⃣ | to = address(raiseBoxFaucet) |
Succeeds and emits MintedNewFaucetTokens event |
Simplify the function to remove the redundant argument and mint directly to the contract address:
This change:
Improves clarity and maintainability.
Removes the misleading to parameter.
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.