The _withdraw function in the provided Solidity code adjusts the share balances before calculating the sharesAmount. This can lead to incorrect share balance adjustments and potential discrepancies in the staking contract.
The function subtracts the shareAmount from the operatorshareBalances and pool totalShares before calculating the sharesAmount per stake using lst.getSharesByStake(_amount). This sequence will result in incorrect share balance adjustments.
}
Incorrect token calculation in the staking pool leading to inflated balance
High
manual review
Ensure that the sharesAmount is calculated before making any adjustments to the share balances.t;
}
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.