The transferReward
function includes a delete
statement that resets a reward to its default value. This can lead to discrepancies in the expected number of rewards, as the array length remains unchanged, potentially causing issues in subsequent reward management operations.
The transferReward function is designed to transfer a specific reward from one user to another.
The delete operation sets the reward at the specified index to its default value but does not reduce the array's length.
Users may experience incorrect counts of available rewards or attempts to transfer or claim non-existent rewards, leading to potential user frustration and operational errors.
Manual Review
Discrepancies in the expected number of rewards after deletion can be eliminated by replacing the deleted reward with the last element in the array and reducing the array length.
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.