Rescuable.sol features a pausing mechanism that is currently only applied to TokenManager::withdraw(...) function. Several critical functions are not protected by a whenNotPaused modifier and could be exposed during emergency pausing.
Quoting README.md:
We demonstrate that markets can not be paused by owner.
The whenNotPaused modifier is used only in the TokenManager::withdraw(...) function:
Here's a list of the CRITICAL functions in the PreMarkets contract that are not covered with the pausing mechanism:
createOffer: Initiates a new offer with collateral deposit.
createTaker: Allows a user to take an existing offer, transferring tokens.
listOffer: Enables listing of a bid offer, potentially with additional collateral.
closeOffer: Cancels an offer and refunds collateral.
relistOffer: Reactivates a previously cancelled offer, requiring collateral redeposit.
abortAskOffer: Terminates an ask offer, refunding remaining collateral.
abortBidTaker: Cancels a bid taker position, refunding the taker.
These functions handle critical operations involving token transfers, collateral management, and offer state changes. The same case could be made for the rest of contracts in the code-base with critical functions, e.g., TokenManager itself.
The lack of pausing exposes critical fund flows during emergencies, introducing serious problmes. e.g., loss of funds from continued trading despite the protocol being compromised.
Manual review.
OpenZeppelin docs.
Apply whenNotPaused modifier to critical functions.
I believe this is informational and non-acceptable severity because: - A single pause on withdraw to be sufficient to pause the markets during times of emergencies, given that is the only function where collateral/point tokens/native ETH can be pulled from market transactions. - Every tadle market place can be switched offline by the admin via [`updateMarketPlaceStatus`](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/core/SystemConfig.sol#L160-L171) and is checked in market actions via [`checkMarketPlaceStatus`](https://github.com/Cyfrin/2024-08-tadle/blob/04fd8634701697184a3f3a5558b41c109866e5f8/src/libraries/MarketPlaceLibraries.sol#L54-L67) to be online. This prevents many major market actions including the creation, listing and settlement of offers.
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.