according to the OperatorVault::exitVault comment updateDepositsfunction should be called before the exitvaultfunction but the code does not enforce a mandatory call to updateDeposits before exitVault
https://github.com/Cyfrin/2024-09-stakelink/blob/main/contracts/linkStaking/OperatorVault.sol#L219
updateDeposits recalculates the total deposits and operator rewards before attempting to exit. Without this update, the contract might work with outdated deposit and reward values, leading to incorrect withdrawals and potential discrepancies in the final transfer of funds.
To ensure that updateDeposits is called before exitVault, add a mechanism to verify this, such as storing a timestamp or flag when updateDeposits is called and checked before allowing the exitVault function to execute. Here’s how you could do that:
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.