Closed sherlock-admin closed 9 months ago
1 comment(s) were left on this issue during the judging contest.
takarez commented:
invalid: more like a centralization risk which is == invalid
Invalid, admins are trusted entities, so this is invalid based on sherlock rules, see point 5.3
Mafia
medium
User cannot unstake when validator is frozen
Summary
The validator may be frozen by the project owner for some reason. At this time, the user cannot unstake his tokens. This is an infringement of the user's rights, because it is not the user's fault that the validator was frozen.
Vulnerability Detail
When the user calls unstake() function, it is checked whether the validator is frozen; if so, the transaction is revert
Impact
It is not the user’s fault that the validator did something bad and suffers because of it - he cannot unstake
Code Snippet
https://github.com/sherlock-audit/2023-11-covalent/blob/main/cqt-staking/contracts/OperationalStaking.sol#L466-L472
Tool used
Manual Review
Recommendation
I suggest checking the status of the validator (whether it is frozen) only if the validator itself makes the unstake