claimAllRewards()function may not be available if the user's array Reward[] in the mapping rewardOwned is too large.
When the Reward[] array on rewardsOwned becomes too large, the user will not be able to withdraw their rewards using the claimAllRewards() function due to exceeding the block gas limit.
This leads to the fact that the totalValue slot cyclically changes its value, this behavior can lead to too many calculations.
The user cannot withdraw their rewards, but such a situation will be rare, since it requires too large an array.
Manual code review.
Split the withdrawal of rewards into parts and make a time limit for theclaimAllRewards().
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.