InTokenManager.sol
, can be found two functions that lack the necessary whenNotPaused
modifier. This oversight allows users to continue depositing funds even when the contract is paused, which could lead to potential risks in emergency scenarios.
The TokenManager.sol
contract implements a pause functionality designed to stop specific operations, such as locking additional funds, during emergencies. The withdraw()
function correctly uses the whenNotPaused
modifier, preventing its execution when the contract is paused. However, the tillIn()
and addTokenBalance()
functions do not have this modifier applied. This means that even if the contract is paused, users can still execute these functions to deposit additional liquidity, which undermines the purpose of the pause functionality.
The lack of the whenNotPaused
modifier on the tillIn()
and addTokenBalance()
functions could result in users continuing to deposit funds into the contract during an emergency. This could expose the contract to further risk, potentially exacerbating the situation that led to the pause. The vulnerability could lead to a scenario where additional funds are locked into the contract during a critical period, potentially leading to financial loss or exploitation.
Manual review
Add whenNotPaused
modifier to tillIn()
and addTokenBalance()
.
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.