Save gas from excessive evm call by caching values used in for loops
A typical for loop definition may look like: for (uint256 i; i < arr.length; i++){}. Instead of using array.length, cache the array length before the loop, and use the cached value to safe gas. This will avoid an MLOAD every loop for arrays stored in memory and an SLOAD for arrays stored in storage. This can have significant gas savings for arrays with a large length, especially if the array is stored in storage.
extremely high gas requirements can render protocol useless for investors
manual review + foundry
cache newPlayers.length
to a variable that can be used in permalink 1
cache players.length
to a variable that can be used in permalink 2
same for other two loops
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.