There are some arrays that can grow indefinitely in size, as they never shrink: this can lead to inefficient memory management and increase the likelihood of out-of-gas errors.
In this code, the s_collateralTokens
array is continually being appended with new elements without any mechanism to remove or reduce its size. This can lead to the array growing indefinitely, consuming unnecessary memory and potentially causing out-of-gas errors in transactions due to excessive computational costs.
Gas Inefficiency: Growing arrays without limits may lead to increased gas costs during smart contract interactions
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.