ctf_sec
medium
MarketCore#_mint should check if the market is not deprecated
MarketCore#_mint should check if the market is not deprecated before the minting, as the comment suggested.
/// @dev We have to check market not deprecated after system state update because that is the function that determines whether the market should be deprecated.
note the function redeem made the check using checkMarketNotDeprecated modifier
function _redeem(
uint112 amount,
address user,
PoolType poolType,
uint256 poolTier
) internal checkMarketNotDeprecated {
User's may mint position even after the market is deprecated.
Manual Review
I am aware that when the market is marked as deprecated, and mint would revert,
marketDeprecated = true;
mintingPaused = true;
but by just looking at the code, checkMarketNotDeprecated modifier is still needed in case the admin accidentally unpause the pool.