The mint
function performs an unsafe downcast of amountToMint
from uint256
to uint128
before calling OpenZeppelin's _mint
. This unnecessary conversion risks overflow issues when amountToMint
exceeds uint128
maximum value, potentially causing silent failures or errors.
The downcast is unnecessary since _mint
accepts uint256
. The conversion creates truncation risks for values above 2^128 - 1
.
Potential function reverts for large amountToMint
values
Risk of incorrect token minting amounts through truncation
Unnecessary contract scalability limitations
Added complexity without benefits
Manual code review
Remove uint128
casting since _mint
supports uint256
natively.
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.