upgradeTier function should upgrade user from fromTierIndex to fromTierIndex + 1 but it wrongly updates to fromTierIndex -1
user joins a Dao by mentioning daoMembershipAddress of Dao and tierIndex in which tier they wants to join,
then they should pay price of that paticular tier
Then if they want to upgrade to higher tier then they use upgradeTier function,
which check weather the given dao has any tier higher than current tierIndex or not
which clearly states that the intension was to upgrade to a higher tier, means to (fromTierIndex+1) not to (fromTierIndex -1)
but the upgradeTier function mistakenly upgrades to fromTierIndex -1
As each tier has it's own price and as we can see when we are upgrading, it was burning 2 from current tier(fromTierIndex) and minting only 1, that means it indicates higher tiers have higher prices.
so user lossing his value which indirectly comes under lossing of user funds.
for example,
If
If a user has 2 tokens in tier 3 and he wants to upgrade,
initially value of those 2 tokens will be 40
case 1) If he upgrades to tier 4 then he has 1 token in tier 4 so value remains same(40)
case 2) if he upgrades to tier 2 then he has 1 token in tier 2 so value he gets is 10 (40-10=30) ,30 loss.
so in case 2 he loss his funds.
manual review
upgrade to fromTierIndex +1 not to fromTierIndex -1
at,
add this line
and delete this line
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.