The removeOperators function in the provided Solidity code fails to send tokens to the operator address before removing them from the staking contract, thereby leading to loss of staked tokens.
The removeOperator() can only be called by the owner of the operator staking pool and is used to remove existing operators. The function however does not transfer the token shares to the operator’s address before removing them from the staking contract. This can result in the loss of tokens that were staked by the operator. The function also fails to queue withdrawal for the operator address before remove them from the staking contract.
removeOperators below makes call to _withdraw() to withdraw tokens for operator before the operator is removed from the staking pool. The _withdraw() however only adjust pool state and fails to send shares to the operator before removing them
here is the withdraw() function
High as operators lose funds
Manual review
Ensure that the appropriate token shares are transferred to the operator’s address before removing them from the staking contract.
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.