StRSR allows user unstake RSR. Later, user can cancel this request by calling cancelUnstake function. Because this function doesn't pay rewards before minting shares, that means that wrong exchange rate will be used and initiator of cancelUnstake will receive more shares, then he should and as result other stakers will lose part of rewards as they were not distributed before canceling.
How it was fixed
Reserve team fixed this issue, be calling _payoutRewards function, before minting new shares. So now exchange rate is up to date.
Lines of code
Vulnerability details
This issue is mitigated.
Explanation of found problem
StRSR allows user unstake RSR. Later, user can cancel this request by calling
cancelUnstake
function. Because this function doesn't pay rewards before minting shares, that means that wrong exchange rate will be used and initiator ofcancelUnstake
will receive more shares, then he should and as result other stakers will lose part of rewards as they were not distributed before canceling.How it was fixed
Reserve team fixed this issue, be calling
_payoutRewards
function, before minting new shares. So now exchange rate is up to date.