The batchRedeemPositionToken and batchRedeemWToken functions process an unbounded array of redemption arguments in a loop. Each iteration of the loop consumes gas, and if the input array (_redeemPositionTokenArgs or _redeemWTokenArgs) is too large, the cumulative gas cost of the loop may exceed the Ethereum block gas limit. This will cause the entire transaction to revert, rendering large batches unusable. The code currently lacks checks to restrict the maximum allowed batch size.
Transactions with large batches will fail due to out-of-gas errors, leading to a degraded user experience and potential loss of functionality. Users may be unable to redeem tokens in batches as intended, forcing them to submit smaller transactions manually, which is inefficient and costly.
manual code review
uint256 public constant MAX_BATCH_SIZE = 100;
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.