Submitted by krikolkk
The seizeRSR function takes RSR from the staking contract when BackingManager wants to sell RSR, but it does not have enough. In this case, the stakers can lose a portion of their stake in order to keep the system healthy. However, an issue arises from broken assumptions about stakeRSR and totalStakes, which will make the contract unable to seize due to revert.
Lets assume the system becomes unhealthy, and the stakers will start unstaking their tokens in fear of an upcoming reset/seize. Then, the expected event comes, and the BackingManager tries to seize RSR from the staking contract.
This action is frontran however, with the last staker who:
Lets examine how does this break seizeRSR.
The likelihood of this issue is LOW. The impact seems somewhere between HIGH and MEDIUM since a necessary rebalance action can be DoSed until it is noticed and an action is taken. Considering that the issue is possible due to a broken invariant, the severity should be judged as MEDIUM.
One way to fix the issue would be to enforce the invariant if totalStakes == 0, then stakeRSR == 0. This could be done by assuring that amount is not 0 in _mint.
Another mitigation could be to update the seizeRSR function to update the stakeRate only if both stakeRSR and totalStakes are non-zero or update the stakeRate to FIX_ONE if either of these two is zero.
tbrent (Reserve) commented:
cccz (judge) commented:
akshatmittal (Reserve) commented:
krikolkk (warden) commented:
akshatmittal (Reserve) commented:
krikolkk (warden) commented:
akshatmittal (Reserve) commented:
krikolkk (warden) commented:
Reserve mitigated
Status: Mitigation confirmed. Full details in reports from Bauchibred, RadiantLabs and ether_sky.
