Extending a lock will sometimes cause only harm to the user by burning their veToken balance which is used for various calculations
Assume a user locked 100 raac for 4 years (max lock) and was minted 100 veRaac.
2 years go by and user decides to call extend for a year extra
The following execution takes place in calculateAndUpdatePower
User's new power is returned to extend, equal to 75. The following logic executes
Since old power is greater than new one, veRaac burn takes place.
User locked their funds for an extra year and lost 25 veRaac in the process. This is problematic since live ve.balanceOf(user) is used when performing boost calculations
User achieved nothing but lose out on boost rewards and lock away their funds for extra time. Even if user extends their lock for 2 extra years, no extra power can be added since newPower = oldPower and they will end up locking their funds for 2 years extra for nothing in return.
Current implementation causes only harm to users and discourages them from extending their locks.
Logic error, loss of rewards
There is no trivial fix for this, complete re-design is necessary
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.