The `migrateWithdraw` function allows users to migrate their staked tokens to a new staking contract even when the current contract is paused. This behavior undermines the pause mechanism, as users can bypass the pause restriction and continue their staking activities in a new contract.
The `migrateWithdraw` function enables users to withdraw their staked tokens and migrate them to a new staking contract specified by the `migrator`. This function can be called regardless of whether the current contract is paused.
Allowing `migrateWithdraw` to be called during the paused state defeats the purpose of the pause functionality. Users can bypass the pause by migrating to a new contract and continuing their staking activities, rendering the pause ineffective.
Manual review
To ensure the pause functionality is effective, add the `whenNotPaused` modifier to the `migrateWithdraw` function.
Adding the `whenNotPaused` modifier ensures that the `migrateWithdraw` function can only be called when the contract is not paused.
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.