Deleting an element in Solidity does not change the array length but only reset the element's value.
The code on line 76 below deletes an element from rewardsOwned[msg.sender] array.
After the deletion, the array length stays the same. This means that the iteration on line 81-83 processes empty elements that have been deleted. This wastes gas from storage read operation and addition with empty/zero value.
A similar issue is also found on line 100.
Wasted gas when processing empty element.
Manual review.
Consider swapping the element to be deleted with the last element then pop the last element.
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.