Judge has assessed an item in Issue #615 as 2 risk. The relevant finding follows:
Unbounded gas usage in claim function of Quest contract
The claim function has an unbounded gas usage that traverses different arrays many times.
The call to RabbitHoleReceipt.getOwnedTokenIdsOfQuest iterates all receipts for the account and then copies the ones for the given quest into a new array
Then it iterates this array to calculate how many of them were already claimed.
Finally it iterates the array again to mark the token ids as claimed in the _setClaimed function.
Judge has assessed an item in Issue #615 as 2 risk. The relevant finding follows:
Unbounded gas usage in claim function of Quest contract The claim function has an unbounded gas usage that traverses different arrays many times.
The call to RabbitHoleReceipt.getOwnedTokenIdsOfQuest iterates all receipts for the account and then copies the ones for the given quest into a new array Then it iterates this array to calculate how many of them were already claimed. Finally it iterates the array again to mark the token ids as claimed in the _setClaimed function.