43 - Calls inside a loop
Calls to external contracts inside a loop are dangerous (especially if the loop index can be user-controlled) because it could lead to DoS if one of the calls reverts or execution runs out of gas. Avoid calls within loops, check that loop index cannot be user-controlled or is bounded. (see here)
- External Calls Inside Loops
- Loop Index User Controlled
- Reverts -> Out-of-Gas Error
- Avoid Calls in Loops
- Prevent DoS