Submitted by 0xRajeev
Ability to pause all token transfers and all state changes for contracts is a guarded-launch best-practice for emergency situations for newly launched projects. The project implements this using a marketsPaused flag per market and a globalPause flag across all markets.
While these prevent renting of cards in a specific market and deposit/withdraw/rent cards across all markets, there are still public/external functions that are unguarded by these flags which can affect contract state in paused scenarios that will make it hard/impossible to recover correctly from the emergency pause.
Examples includetopupMarketBalance() and refundUser() in Treasury can be triggered even in a globalPause scenario. There could be other function flows where it is not obvious that market/global pausing is enabled because it is enforced in one of the functions called deep within the code within one of the conditionals.
The impact is that markets get paused but the contracts cannot be restarted because of state changes affected during the pause via unguarded external/public functions.
Recommend applying marketPaused and globalPause check clearly in the beginning of all public/external functions which move tokens/funds in/out or change contract state in any way. Also, Validate all possible control flows to check that market/global pausing works in all scenarios and applies to all contract state and not specific functionalities.
Splidge (Reality Cards) disputed and disagreed with severity:
dmvt (Judge) commented:
