The documentation of the project says that the admin should have the ability to "pause all the markets" and the relevant contracts - PreMarkets and DeliveryPlace are pausable but the modifier whenNotPaused
is not used anywhere in them
PreMarkets and DeliveryPlace do not use the whenNotPaused
modifier and according to the documentation, there should be an ability to "pause all the markets". Only TokenManager's withdraw function uses this modifier but it's not enough because it only concerns the withdrawal of tokens and if a bug is found in the other contracts, attackers will be free to trade and transact, which can change the state of the system and in the end lead to loss of funds.
High, pausing is intended functionality of the project and it's not implemented correctly
Manual review
Use the whenNotPaused
modifier in the relevant functions in PreMarkets and DeliveryPlace responsible for trading and settling orders.
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.