mintSnowman Enables Denial of Service (Improper Input Validation + Gas Limit Exhaustion)The mintSnowman(address receiver, uint256 amount) function contains a for loop that iterates amount times, calling _safeMint() on each iteration.
Since amount is user-controlled and unbounded, malicious users can call this function with excessively high values, causing the transaction to exceed the block gas limit and revert.
Likelihood:
A user consistently transmits transactions with extremely high amount values, exceeding the block gas limit.
Multiple such transactions congest the network, consuming all usable gas and preventing legitimate minting.
Impact:
Complete service disruption of the minting feature, preventing all users from creating NFTs.
Wasted gas costs for users that attempt to mint high amounts and fail.
This simple test demonstrates the potential attack:
NOTE: forge should be installed
Then run:
forge test
The test should pass. Which means it'll revert.
Define a maximum cap, e.g., MAX_MINT_PER_TX = 20, and assert amount falls within a safe range.
Use:
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.