The lockallows users to lock RAAC tokens and get veRAAC tokens in exchange.
The issue arises with the if (totalSupply() + amount > MAX_TOTAL_SUPPLY) revert TotalSupplyLimitExceeded();It's an invalid way of checking the MAX_TOTAL_SUPPLYthreshold because totalSupplyis the supply of veRAAC tokens while the amount argument is the amount of RAAC tokens to lock.
since newPoweris the actual amount of veRAAC tokens being minted then the correct check should be if (totalSupply() + newPower > MAX_TOTAL_SUPPLY) revert TotalSupplyLimitExceeded();.This should be done after newPowerhas been calculated. or check the new total supply after minting and compare with MAX_TOTAL_SUPPLY
Incorrect MAX_TOTAL_SUPPLY validation
Manual
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.