The upgradeTier function uses an incorrect higher-tier check, potentially leading to inconsistencies and user confusion.
In the upgradeTier
function, the code checks for the availability of a higher tier using the condition:
However, the intended tier upgrade is actually from fromTierIndex
to fromTierIndex - 1
. This means the check should ensure that fromTierIndex
is greater than or equal to 1, allowing users to upgrade to a higher tier by moving from a higher index to a lower one. The current implementation mistakenly checks fromTierIndex + 1
, which does not correspond to any actual tier in the intended upgrade logic.
The correct check should be:
This adjustment would align the logic with the intended tier structure and ensure upgrades only happen when a valid higher tier exists.
The incorrect tier comparison creates potential inconsistencies or confusion for users attempting upgrades if fromTierIndex is invalidly referenced.
Manual
Adjust the tier check condition to:
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.