DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: high
Invalid

Does not override `_emergencyWithdraw`, the `emergencyWithdraw` function cannot work

Summary

The StrategyMainnet, StrategyOp, and StrategyArb does not override _emergencyWithdraw function.

Vulnerability Details

# TokenizedStrategy.sol
function emergencyWithdraw(
uint256 amount
) external nonReentrant onlyEmergencyAuthorized {
// Make sure the strategy has been shutdown.
require(_strategyStorage().shutdown, "not shutdown");
// Withdraw from the yield source.
IBaseStrategy(address(this)).shutdownWithdraw(amount);
}
# BaseStrategy.sol
function shutdownWithdraw(uint256 _amount) external virtual onlySelf {
_emergencyWithdraw(_amount);
}
function _emergencyWithdraw(uint256 _amount) internal virtual {}

When the owner calls emergencyWithdraw nothing happens, because StrategyMainnet, StrategyOp, and StrategyArb do not override _emergencyWithdraw function.

Impact

emergencyWithdraw cannot work

Tools Used

manual

Recommendations

override _emergencyWithdraw function in StrategyMainnet, StrategyOp, and StrategyArb contract.

Updates

Appeal created

inallhonesty Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.