MAX_TOTAL_SUPPLY will revert when it shouldn't due to summing locked RAAC with minted veRAAC
Let's observe the lock method's sanity checks
We see that the check against MAX_TOTAL_SUPPLY is performed by summing 2 entirely different numbers. One is the total supply of veTokens while the other is the desired lock amount, expressed in RAAC token. veToken minting is proportional to the lock amount and duration as user is minted the bias derived from calculateAndUpdatePower
If a user locks 100 raac tokens for 2 years, they will get minted 50 veRaac hence why summing the 2 will be problematic.
Now assume the MAX_TOTAL_SUPPLY = 1000 and veToken.totalSupply = 950. The user from the example above knows this and wants to lock 100 raac for 2 years in order to get 50 veRaac and fill the buffer. His lock attempt will revert since 950 + 100 > 1000
Logic error, unexpected behaviour
Perform the check using the actual minted amount, not the locked one
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.