The QuestFactory contract stores a mutable address for the RabbitHoleReceipt contract, while each Quest contract stores an immutable copy at creation. If the factory's receipt address is changed, users can still mint receipts through the factory, but those receipts are unknown to the Quest's original receipt contract, so users cannot claim rewards without manual intervention.
The ERC20 quest contract lets the owner withdraw the protocol fee before recovering unclaimed tokens, and the recovery function does not account for a fee that has already been paid out. If the owner calls the functions in that order, the fee amount stays trapped in the contract and cannot be recovered.
The mintReceipt function in QuestFactory validates signatures that only cover the user's address and quest ID, without a deadline, chain ID, or contract address. An attacker could replay a valid signature on another QuestFactory instance or after a long delay to mint an unintended RabbitHoleReceipt token.
A buyer on a secondary NFT marketplace can purchase an NFT that has already been used to claim a reward, leaving them unable to claim that reward themselves. The seller can front-run the buyer's purchase by claiming the reward first, so the buyer loses the expected value.
The Erc1155Quest contract's withdrawRemainingTokens function transfers the entire remaining token balance to the owner when the quest ends, without reserving tokens for unclaimed rewards. As a result, users who try to claim after the owner withdraws will have their transactions revert because the contract no longer holds enough tokens.
The claim function iterates over all tokens a user owns for a quest, which can exceed the block gas limit if a user accumulates many tokens, causing the transaction to fail. An attacker can grief a user by sending them many tokens, forcing them to lose gas fees when claiming.
When the reward token is an ERC1155 or ERC777, an attacker can reenter the claim function and redeem an additional token, causing the redeemedTokens counter to be lower than the actual number of redeemed tokens. This mismatch can make the withdrawRemainingTokens calculation underflow and revert, leaving funds stuck in the contract.
The withdrawFee function in the Erc20Quest contract had no record of having already paid out, so it could be called repeatedly and each call sent the protocol fee again. Because the modifier only checked the end time and not the caller, anyone could trigger these repeated withdrawals after a quest ended and drain the contract's tokens.
The onlyMinter modifier in the RabbitHoleReceipt and RabbitHoleTickets contracts compared the caller to the minter address but did not revert on failure, so the check had no effect. Any account could mint receipt and ticket tokens, and receipts could be used to claim rewards from quests.
The createQuest function deploys quest contracts using create, so the address depends only on the factory's nonce. An attacker could exploit a blockchain reorganisation to deploy a quest at an address where a victim had already sent funds, potentially stealing those funds.
The receipt minting function does not check whether the quest has ended, and the signed hash has no deadline, so a user can mint a receipt after the quest end time. If the quest owner has already withdrawn remaining tokens, the user cannot claim the reward because the contract lacks funds.
RQ
RabbitHole Quest Protocol contest
Medium
Instant results are busy. Press Enter to search every report.
No direct matches. Search every report above, or try a bug class like IDOR or SSRF.