Tadle

Tadle
DeFiFoundry
27,750 USDC
View results
Submission Details
Severity: low
Invalid

Critical functions that should be pausable are missing the `whenNotPaused` modifier, despite the contracts being pausable

Summary

Most of the contracts in scope contain critical functions that cannot be paused in case of an emergency.

Vulnerability Details

The contracts in scope are pausable as they inherit Rescuable.sol, which holds the pause/unpause functionality, that allows the owner to pause the contracts in case of an emergency.

function setPauseStatus(bool pauseSatus) external onlyOwner {
if (pauseSatus) {
_pause();
} else {
_unpause();
}
emit SetPauseStatus(pauseSatus);
}

Contracts in scope such as TokenManager.sol, CapitalPool.sol, DeliveryPlace.sol, PreMarkets.sol, SystemConfig.sol all inherit the Rescuable contract, making them pausable, but for the most part, their functions do not hold a whenNotPaused modifier. In fact, only the withdraw function in TokenManager.sol can potentially be paused, which opens the protocol up to great centralization risk as the owner can easily prevent users from being able to get their funds. And as a rule of thumb, also, based on major protocol implementations, functions to add funds to a protocol should be pausable in case of emergencies, and functions to remove tokens from protocol should always be open so that users can easily rescue their funds.

But major critical functions like tillIn, addTokenBalance, createOffer, createTaker, listOffer, relistOffer, settledAskOffer, settledAskTaker, closeBidOffer, closeBidTaker, settleAskMaker and settleAskTaker are all very important functions which cannot be paused, even though they arguably should be, since they funnel funds into the protocol.

Impact

In case of an emergency (a hack or something of that sort), protocol will not be able to pause these functions, exposing the users to serious risks.

Tools Used

Recommendations

Add the whenNotPaused modifier to needed functions.

Updates

Lead Judging Commences

0xnevi Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[invalid] finding-Rescuable-pause-no-effect

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.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.