In the SnowMan::mintSnowMan, the input (uint256 amount) is being iterated and the var s_TokenCounter being increased with each addition of the token.
Explain the specific issue or problem in one or more sentencesIn the SnowMan::mintSnowMan function, the input (uint256 amount) is being iterated in the function instead of the s_TokenCounter.
Also, in line 42 of the contract SnowMan, the var s_TokenCounter is being increased and this could lead to a possible DOS attack whereby an attacker could deliberately keep calling the function in order to go beyond a given gas limit.
Likelihood:
This will occur whenever the SnowMan::mintSnowMan function is called.
Impact:
When the SnowMan::mintSnowMan function is called, it would revert for two reasons; the amount var is being iterated instead of the s_TokenCounter var.
Secondly, the contract will run out of gas and revert due to possible large number of tokens that may present in the array.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.