When quest is paused, RabbitHole receipt can still be traded and transferred to others #446
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-a
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/main/contracts/Quest.sol#L96-L118
Vulnerability details
Impact
When the quest is paused, the minted RabbitHole receipt can still be traded and transferred from its holder to another user. If a user wants to exchange some tokens to the reward tokens of the quest, and the price for purchasing the receipt is better than the rates offered by other exchanges, she or he would purchase the receipt from the holder. However, since the quest is paused at that moment, calling the following
claim
function for this purchased receipt will revert with theQuestPaused
custom error. Although the quest can be unpaused later, the buyer fails to receive the associated reward tokens immediately and cannot fulfill the goal for exchanging tokens in a timely manner. Also, when the quest becomes unpaused, the exchange rate offered by the quest can become worse than these offered by other exchanges at that moment.https://github.com/rabbitholegg/quest-protocol/blob/main/contracts/Quest.sol#L96-L118
Proof of Concept
Please append the following test in the
claim()
describe
block inquest-protocol\test\Erc20Quest.spec.ts
. This test will pass to demonstrate the described scenario.Tools Used
VSCode
Recommended Mitigation Steps
When the quest is paused, the transfer functionality of the minted RabbitHole receipts can be paused as well.
The text was updated successfully, but these errors were encountered: