Add max lock limit of 4 years

This commit is contained in:
Martin Strobl 2023-09-27 13:57:42 +02:00
parent 24e59ff4a8
commit e4085c3447
1 changed files with 1 additions and 0 deletions

View File

@ -88,6 +88,7 @@ contract StakeManager is Ownable {
function lock(uint256 _time) external onlyVault {
Account storage account = accounts[msg.sender];
processAccount(account, currentEpoch);
require(_time < 209 weeks, "Cannot lock for more than 4 years");
require(block.timestamp + _time > account.lockUntil, "Cannot decrease lock time");
mintIntialMultiplier(account, _time);
}