The TokenManager.sol
contract includes a vulnerability in its withdraw mechanism. `withdraw()
function is protected by a whenNotPaused
modifier. This design flaw prevents users from retrieving their tokens when the contract is paused, potentially leading to a permanent loss of assets.
The withdraw()
function in TokenManager.sol
is designed to allow users to retrieve their tokens. However, this function is gated by the whenNotPaused
modifier, meaning it cannot be executed when the contract is in a paused state. There is no alternative mechanism provided for users to withdraw their tokens if the contract is paused, either temporarily or permanently.
Users may permanently lose access to their tokens if the contract is paused and no alternative withdrawal mechanism is in place. This can result in a complete and irreversible loss of assets for the users, particularly in cases where the contract remains paused indefinitely.
Bob deposits tokens in the protocol
By any reason the contract gets temporary/permanently paused
Bob tokens are lost for the duration of the paused state. It may be forever.
Manual review
Consider a backup plan for this situation with which token owners will always be able to withdraw their tokens.
The following issues and its duplicates are invalid as admin errors/input validation/malicious intents are1 generally considered invalid based on [codehawks guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). If they deploy/set inputs of the contracts appropriately, there will be no issue. Additionally admins are trusted as noted in READ.ME they can break certain assumption of the code based on their actions, and
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.