Tadle

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

Lack of Comprehensive Pausability for Critical Functions

Vulnerability Details

The TokenManager.sol contract features a whenNotPaused modifier that is currently only applied to the withdraw() function. This limited application of the pausing functionality could leave critical operations exposed during emergencies, potentially jeopardizing the safety of staked assets and reward distributions.

TokenManager.sol#L137-L140

function withdraw(
address _tokenAddress,
TokenBalanceType _tokenBalanceType
) external whenNotPaused {
...

Other critical functions in TokenManager.sol, PreMarkets.sol, and DeliveryPlace.sol are not protected by the pausing mechanism, including:

  • tillIn() in TokenManager.sol

  • createOffer(), createTaker(), listOffer(), closeOffer(), relistOffer(), abortAskOffer(), and abortBidTaker() in PreMarkets.sol

  • closeBidOffer(), closeBidTaker(), settleAskMaker(), and settleAskTaker() in DeliveryPlace.sol

Impact

The lack of comprehensive pause functionality exposes the contracts to potential issues if they need to be paused for maintenance or in response to an attack. By not restricting all non-essential functions during a pause, users can still interact with the contracts in ways that may not be intended during a paused state. This could lead to:

  • Unauthorized transactions during a security breach.

  • Potential loss of tokens if a vulnerability is exploited before a fix can be applied.

  • Increased risk to user assets, as pausing is a common safeguard to mitigate damage during incidents.

Recommendations

Apply whenNotPaused modifier to mentioned critical 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.