The addReward function in the MysteryBox contract employs the push method to add rewards individually to the rewardPool array. This approach can lead to high gas costs, especially when multiple rewards are added in succession.
High gas costs may deter users from interacting with the contract, negatively affecting user experience and participation rates.
To optimize gas usage, it is recommended to implement a bulk addition function that allows the addition of multiple rewards in a single transaction. This change can significantly reduce gas consumption and enhance the overall user experience.
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.