RaiseBoxFaucet token contract"An owner can only mint if the Contract had less than or equal to 1000e18, this check is implemented inside RaiseBoxFaucet:mintFaucetTokens function.
The check itself could cause an issue where a claimers could always be prevented to claim a new faucets token when the owner only mint a small amount of tokens when the faucets is empty.
The owner then have to always mint a substantial amount of new tokens when the faucet token is empty or faced with a scenario where the owner mint a small amount of tokens but needs to keep doing it as to keep the faucets running.
Likelihood:
In the source code, the RaiseBoxFaucet:INITIAL_SUPPLY had the amount large enough to at least prevent this vulnerabilities to happened
It would take 1e6 amount of claims to empty the faucets. and trigger the unfortunate scenario explained above.
Impact:
The RaiseBoxFaucet:mintFaucetTokens function is of no use before the first 1e6 claims being executed which took forever.
Might as well remove the function entirely to save gases upon contract creation
NOTE: for this PoC, i reduce the RaiseBoxFaucet:INITIAL_SUPPLY to simulate an almost empty faucet token.
First, On src/RaiseBoxFaucet:
then Implement the same changes in test/RaiseBoxFaucet.t.sol
After that Implement a test function below on test/RaiseBoxFaucet.t.sol
Just remove RaiseBoxFaucet:mintFaucetTokens to save gases, the RaiseBoxFaucet:INITIAL_SUPPLY of 1000000000e18 tokens should be more than enough to prevent scenario above
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.