Upbeat Paisley Liger
Medium
Functions like batchRefund and finalizeWinners iterate over arrays of arbitrary length, which could exceed the gas limit and cause the transaction to fail.
function batchRefund(bytes32 launchGroupId, bytes32[] calldata launchParticipationIds) external onlyRole(OPERATOR_ROLE) nonReentrant whenNotPaused onlyLaunchGroupStatus(launchGroupId, LaunchGroupStatus.COMPLETED) { for (uint256 i = 0; i < launchParticipationIds.length; i++) { ParticipationInfo storage info = launchGroupParticipations[launchParticipationIds[i]]; _processRefund(launchGroupId, launchParticipationIds[i], info); } }
https://github.com/sherlock-audit/2025-02-rova/blob/main/rova-contracts/src/Launch.sol#L502
none
none
none
Denial of Service (DoS) in batchRefund and finalizeWinners .
No response
Implement pagination or limit the number of items processed in a single transaction.
Example:
function batchRefund(bytes32 launchGroupId, bytes32[] calldata launchParticipationIds, uint256 limit) external onlyRole(OPERATOR_ROLE) { require(limit <= 100, "Limit too high"); for (uint256 i = 0; i < launchParticipationIds.length && i < limit; i++) { // Process refund } }