userLock.amount + amount could be larger then maxLock amount
User locks 1000
tokens for 2 years
, gaining X
voting power, later locks an additional 500
tokens through lock function and it overrides his locks and X
voting power is lost instead of being added to the new calculation.
Users who extend or add to their locks may lose previously accumulated voting power.
Manual code review
function calculateAndUpdatePower(
VotingPowerState storage state,
address user,
uint256 amount,
uint256 unlockTime,
bool isFromLock // Нов параметър за разграничаване на първоначално заключване и увеличение
) internal returns (int128 bias, int128 slope) {
if (amount == 0 || unlockTime <= block.timestamp) revert InvalidPowerParameters();
}
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.