In the lock function in the veRAACToken.sol, there is a check to limit the totalSupply to MAX_TOTAL_SUPPLY. This check is wrong.
The issue lies in the fact that the amount minted is not equal to amount, rather amount * duration / MAX_DURATION. Thus this check doesnt make sense, as the totalSupply is not going to be increased by amout, but rather with the newPower.
Note: the similar error is present in the increase function whcih doesnt check for the totalSupply condition
Impact
incorrect (less amount can be locked) limitation of totalSupply in the lock function, and more amount can be minted using the increase function
manual review
check with the newPower in the lock function, and add the missing check in the increase function
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.