The transferReward
function in MysteryBox
does not validate the _to
parameter, allowing rewards to be transferred to the zero address. Transferring assets to the zero address results in an irreversible loss of those rewards.
No Zero address check in the transferReward
function.
If a reward is transferred to the zero address, it effectively becomes irretrievable, leading to a potential loss of user assets. This can result in unintended consequences for both users and the contract's business logic, as the zero address cannot be interacted with.
Manual Review
Add a validation check to ensure that the _to
address is not the zero address:
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.