`emergency_shutdown` role is not enough for emergency shutdown.
Let's examine the function emergencyShutdown():\\n```\\nfunction emergencyShutdown() external onlyRole("emergency_shutdown") {\\n    active = false;\\n\\n    // If necessary, defund sDAI.\\n    uint256 sdaiBalance = sdai.balanceOf(address(this));\\n    if (sdaiBalance != 0) defund(sdai, sdaiBalance);\\n\\n    // If necessary, defund DAI.\\n    uint256 daiBalance = dai.balanceOf(address(this));\\n    if (daiBalance != 0) defund(dai, daiBalance);\\n\\n    emit Deactivated();\\n}\\n```\\n\\nThis has the modifier `onlyRole("emergency_shutdown")`. However, this also calls function `defund()`, which has the modifier `onlyRole("cooler_overseer")`\\n```\\nfunction defund(ERC20 token_, uint256 amount_) public onlyRole("cooler_overseer") {\\n```\\n\\nTherefore, the role `emergency_shutdown` will not have the ability to shutdown the protocol, unless it also has the overseer role.\\nTo get a coded PoC, make the following modifications to the test case:\\n```\\n//rolesAdmin.grantRole("cooler_overseer", overseer);\\nrolesAdmin.grantRole("emergency_shutdown", overseer);\\n```\\n\\nRun the following test command (to just run a single test test_emergencyShutdown()):\\n```\\nforge test --match-test test_emergencyShutdown\\n```\\n\\nThe test will fail with the `ROLES_RequireRole()` error.
There are two ways to mitigate this issue:\\nSeparate the logic for emergency shutdown and defunding. i.e. do not defund when emergency shutdown, but rather defund separately after shutdown.\\nMove the defunding logic to a separate internal function, so that emergency shutdown function can directly call defunding without going through a modifier.
`emergency_shutdown` role cannot emergency shutdown the protocol
```\\nfunction emergencyShutdown() external onlyRole("emergency_shutdown") {\\n    active = false;\\n\\n    // If necessary, defund sDAI.\\n    uint256 sdaiBalance = sdai.balanceOf(address(this));\\n    if (sdaiBalance != 0) defund(sdai, sdaiBalance);\\n\\n    // If necessary, defund DAI.\\n    uint256 daiBalance = dai.balanceOf(address(this));\\n    if (daiBalance != 0) defund(dai, daiBalance);\\n\\n    emit Deactivated();\\n}\\n```\\n