The OperatorStakingPool contract is intended to manage the stakes of node operators, but the withdraw function updates internal balances without transferring the corresponding tokens to the operator, which results to in the operator's tokens being locked in the contract.
The Operator Staking Pool allows node operators to stake their LSTs.
The withdraw function is supposed to handle the transfer of these tokens back to the operator upon withdrawal. However, it only updates the internal balances of the contract without initiating a token transfer, leaving the operator's tokens locked inside the contract.
This issue arises because the transferAndCall function, which should be responsible for transferring tokens, is missing from the withdrawal process. As a result, while the contract's internal accounting shows a withdrawal, the tokens remain within the contract.
Deposited funds by operators are lost in the contract.
The following PoC can be copy-pasted in the operator-staking-pool.test.ts file and run using npx hardhat test --grep "OperatorStakingPool withdraw function fails to transfer tokens"
Manual review.
To resolve this issue, ensure the tokens are transferred to the operator using the transferAndCall function :
Also, tests regarding funds, like withdraw should work correctly, can be updated to test both the actual possession of the tokens from the operators and their supposed balance in the 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.