increase will revert in most cases due to an underflow when it tries to mint tokens to the user
increase will revert in most cases due to an underflow when it tries to mint tokens to the user:
The underflow occurs because we use the live bias math which calculates out initial amount, lowered by the slope * timeDelta, or simply if we have locked 10k tokes for 1 year at 1:1 rate, and 6 months have passed we would have 5k voting power.
Now when we get back to the first piece of code we can see that if out user makes an increase smaller than his decay the function would revert.
Example:
User locks 12k tokens for 4 year at 1:1 ratio and gets minted 12k veRAAC tokens
3 years pass and he want's to increase his voting power, so he calls increase with 2k RAAC
The new bias will be 3.5k
And when we reach mint it would underflow
Function is broken, will revert most of the times
Users will not be able to increase their voting power, but be forced to wait so their lock can expire and to make a new one.
Manual review
Have the same if condition extend uses:
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.