Submitted by IllIllI
The withdraw() has an unbounded loop with external calls. If the gas costs of functions change between when deposits are made and when rewards are withdrawn, or if the gas cost of the deposit (transferFrom()) is less than the gas cost of the withdrawal (transfer()), then the withdraw() function may revert due to exceeding the block size gas limit.
transfer() is an external call, and rewards.length has no maximum size:
https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/PermissionlessBasicPoolFactory.sol#L224-L231
Allow the specification of an offset and length to the withdraw() function, so that withdrawals can be broken up into smaller batches if required
illuzen (FactoryDAO) confirmed
