Since s_collateralTokens
has the same length as tokenAddresses
from the constructor and cannot be modified, the second for-loop will run for exactly the same number of iterations as the one in the constructor. The first for-loop would have been revert in the constructor if i
ever became greater than or equal to tokenAddresses.length
. Therefore, the second for-loop can safely use unchecked { i++; }
to increment i
. This saves 30-40 gas per loop
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.