During initiateUnlock, though the total lock duration is passed, user's boost among is still nullified.
To initiate the unlock, user can call the function initiateUnlock and wait till the expiry to withdraw their locked amount.
User can call this function once half of the lock duration is passed.
Lets see the function initiateUnlock,
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/SDLPoolPrimary.sol#L107-L121
above functions check if half of the lock duration is passed and updates the expiry time. Later user would call withdraw function and withdraw their sdl tokens.
Here, it is not checked if the lock duration is already passed when updating the boost amount. But the boost amount is reset.
This would impact a valid user, who initiate the unlock after their total lock duration and waiting for some time. But they will be forgiven the rewards because non availability of boost amount.
User would be forgiven the rewards despite they locked for full duration.
Manual review.
Update the initiateUnlock function as show below.
https://github.com/Cyfrin/2023-12-stake-link/blob/549b2b8c4a5b841686fceb9c311dca9ac58225df/contracts/core/sdlPool/SDLPoolPrimary.sol#L107-L121
Update this boost amount value in withdraw call if partial withdraw is done.
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.