Users may fail to increase their veRAAC token because of revert
In veRAACToken::increase(), users can increase their voting power via increasing RAAC token locked. We will re-calculate the new bias according to the updated locked amount and the left lock duration. And we will mint the added veRAAC token. The total veRAAC token should equal to the initial bias.
The problem happens in the calculation of newPower - balanceOf(msg.sender)
. Here balanceOf(msg.sender) is the initial bias. And newPower
is the updated bias. It's possible that the newPower
will be less than balanceOf(msg.sender)
because the left lock period is less than the initial lock period. This will cause that users fail to increase.
For example:
Alice locks 1000 RAAC token for 4 years. Then Alice will get 1000 initial power, 1000 veRAAC Token.
2 years later, Alice want to increase 500 RAAC token to increase her voting power, the initial power will become 1500 * 2 years/ 4 years = 750
. This increase transaction will be reverted because the newPower
is less than balanceOf(msg.sender)
.
Users may fail to increase their lock positions in some cases.
Manual
Compare newPower
with balanceOf(msg.sender)
, we need to burn the related veRAAC token if newPower
is less than balanceOf(msg.sender)
.
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.