Submitted by carlitox477, also found by trustindistrust, ArmedGoose, libratus, luxartvinsec, adriro, 0xRobocop, UdarTeam, betweenETHlines, manikantanynala97, minhquanym, lukris02, cryptojedi88, horsefacts, glcanvas, glcanvas, Atarpara, simon135, mookimgo, gzeon, IllIllI, p4st13r4, thekmj, evan, Tointer, 0xbepresent, and ladboy233
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/Quest.sol#L99
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/RabbitHoleReceipt.sol#L117-L133
claim function can be summaraized in next steps:
The problem with this functions relays in its dependency on RabbitHoleReceipt.getOwnedTokenIdsOfQuest. Its behaviour can be summarized in next steps:
If a user actively participates in multiple quests and accumulates a large number of tokens, the claim function may eventually reach the block gas limit. As a result, the user may be unable to successfully claim their earned tokens.
It can be argued that function ERC721.burn can address the potential DOS risk in the claim process. However, it is important to note the following limitations and drawbacks associated with this approach:
Griefing
Lose of unclaimed rewards
Then, Alice can only burn some of her tokens to claim at least some rewards.
Code
Code sample
If a user can send a token list by parameter to claim function, then this vector attack can be mitigated.
To do this add next function to RabbitHoleReceipt.sol:
Then modify Quest.claim:
kirk-baird (judge) decreased severity to Medium
waynehoover (RabbitHole) acknowledged
