The addNewBatch function allows the protocol to increase the currentBatchSize but lacks any mechanism to decrease it. This one-sided adjustment could lead to unintentional or excessive batch sizes without a way to revert them.
Once the batch size is increased, there is no function to reduce it.
May result in oversized batches that exceed intended limits.
Inflexibility in contract management, hindering batch size adjustments.
Potential operational issues if large batch sizes become problematic.
Manual code review.
Implement a reduceBatchSize function with appropriate checks to prevent underflow and ensure valid batch sizes:
This addition provides flexibility and improves contract maintainability.
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.