Operator don't receive tokens from withdrawfunction in OperatorStakingPool due to missing token transfer logic in the _withdrawfunction which could trap all tokens sent to the contract and cause loss of tokens for operators.
The _withdrawfunction in OperatorStakingPool.sol only decrease the total shares and share balances of the operator that tries to withdraw. But there's no logic to transfer the token to the operator, as seen below:
Note that the _withdrawfunction is also used in the removeOperators function, so removed operators completely lost their tokens as they can't call the withdrawfunction anymore.
Every token that is deposited into OperatorStakingPool contract will be trapped.
Operator can't withdraw their tokens.
Removed operators lost their tokens.
Manual Review
Implement a transfer token logic using transferAndCall function of the ERC677 to the operator caling the withdrawfunction:
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.