Acidic Raspberry Rook
Medium
Contract UsualX is a ERRC4626 vault.
The contract can be paused.
function depositWithPermit(
uint256 assets,
address receiver,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external whenNotPaused nonReentrant returns (uint256 shares) {
try IERC20Permit(asset()).permit(msg.sender, address(this), assets, deadline, v, r, s) {} // solhint-disable-line no-empty-blocks
catch {} // solhint-disable-line no-empty-blocks
return deposit(assets, receiver);
}
While withdraw and redeem has the whenNotPaused modifier.
the function deposit and mint is missing whenNotPaused,
then depsoit and token transfer can be executed as usual even when the contract is paused.
add whenNotPaused modifier to function mint and redeem