Potential underflow in upgradeTier()
function when fromTierIndex
is zero.
In the upgradeTier()
function, the following line may cause an underflow error if fromTierIndex
is zero:
When fromTierIndex
is zero, fromTierIndex - 1
will result in an underflow, causing the function to revert.
If fromTierIndex
is zero, the function call will revert due to underflow.
Manual Review
Visual Studio Code (VSCode)
Add a check to ensure fromTierIndex > 0
or revert with a custom error.
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.