-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incase a malicious attack occurs and the quest is paused, the owner won't be able to withdraw some of his tokens back. #634
Comments
kirk-baird marked the issue as duplicate of #42 |
Hey @kirk-baird, can you take a look at this again. This isn't a duplicate of #42, the issue here describes how in an emergency situation (when the quest is paused) duo to a malicious attack, can lead to loss of funds as the owner won't be able to withdraw some of his tokens back. |
Agreeing with @CodingNameKiki that this is not a duplicate of #42 as it is related to pausing and users not being able to call Pausing issues are covered by the centralisation risk issue in the public report and so I'm going to downgrade this to QA. |
kirk-baird marked the issue as not a duplicate |
kirk-baird changed the severity to QA (Quality Assurance) |
kirk-baird marked the issue as grade-b |
kirk-baird marked the issue as grade-a |
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/Erc20Quest.sol#L81-L87
Vulnerability details
Impact
Incase a malicious attack occurs and the quest is paused, the owner won't be able to withdraw some of his tokens back, as a result the tokens will be stuck in the quest contract.
Proof of Concept
By asking the sponsor - a quest can be in paused state as an emergency situation (malicious attack, some issue on their
off-chain signature etc). When a quest is paused by the owner, the function
claim
is uncallable and reverts, duo to that users are unable to claim their receipts and receive rewards.Lets say a malicious attack occurs and the owner successfuly pauses the quest contract, so the attackers can't claim the receipts.
Basically this stops the malicious attack, but doesn't fix the main problem as at the end of the quest the owner won't be able to withdraw the remaining tokens for the minted receipts the attackers posses. Yes the attackers won't be able to claim their receipts as the quest contract is paused, but neither the owner will be able to withdraw the tokens back, as a result the tokens will be stuck in the contract.
The owner should have a way to withdraw the tokens allocated for the unclaimed receipts incase of malicious attack.
Tools Used
Manual review.
Recommended Mitigation Steps
Consider applying a check in the function
withdrawRemainingTokens
, which incase the contract is paused.The owner will be able to withdraw all of the remaining tokens in the contract:
The text was updated successfully, but these errors were encountered: