Submitted by sorrynotsorry
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.
Reference
Gravity.sol#L453-L456
Gravity.sol#L568-L573
Gravity.sol#L579-L581
Avoid combining multiple calls in a single transaction, especially when calls are executed as part of a loop.
Always assume that external calls can fail.
Implement the contract logic to handle failed calls.
mlukanova (Cudos) acknowledged
Albert Chon (judge) commented:
