When calling lock()
in veRAACToken.sol, the total amount of veRAAC token cannot exceed MAX_TOTAL_SUPPLY
.
RAAC token and veRAAC token has different value according the the duration locked. The check assumes that RAAC token have the same value as veRAAC token when checking MAX_TOTAL_SUPPLY
, which is incorrect.
In lock()
, the function checks whether the totalSupply, which refers to veRAACToken, + amount, which is the RAAC token, is not greater than MAX_TOTAL_SUPPLY
.
Assuming that 1 RAACToken is worth 1 veRAACToken if the duration is locked for 4 years, and 1 RAACToken is worth 0.25 veRAACToken if the duration is locked for 1 year.
A user has 500,000 RAACTokens to deposit and the total supply of veRAACToken is currently at 99.7M (left 300k). The user cannot deposit 500,000 RAACTokens for 1 year to get 125,000 veRAACTokens because it will exceed the MAX_TOTAL_SUPPLY
since the lock()
function assumes all RAACToken is equal to veRAACToken, (99.7 + 0.5 = 100.2M, fails), instead of (99.7 + 0.125 = 99.825M, passes)
Some lock() positions cannot be created.
Manual Review
Recommend having the check when veRAAC token is calculated
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.