The total supply cap check is incorrect in veRAACToken::lock().
In veRAACToken, we have one limitation as below. The owner wants to set one cap for the total veRAAC token based on the comments. We should notice that MAX_TOTAL_SUPPLY and MAX_TOTAL_LOCKED_AMOUNT are different. MAX_TOTAL_SUPPLY is one cap for the total veRAAC token. And MAX_TOTAL_LOCKED_AMOUNT is the total locked RAAC token amout.
The problem is that we use amount(locked RAAC token amount) to check the MAX_TOTAL_SUPPLY limitation incorrectly. We should use newPower(newly minted veRAAC token amount) to check MAX_TOTAL_SUPPLY.
Incorrect max supply check. This may cause that normal lock transaction will be reverted.
For example: Alice locks 10000 RAAC for 1 years. Then the minted veRAAC amount should be 2500 RAAC. If the totalSupply() + amount > MAX_TOTAL_SUPPLY, this may cause that normal lock will be blocked incorrectly.
Manual
Use newPower to check the MAX_TOTAL_SUPPLY limitation.
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.