Accessing storage instead of memory on lines 262 and 263 in Lender.sol
incurs extra gas costs
pools[poolId]
on lines 262 and 263 are accessing storage when they can instead access memory; the memory variable pool
has been set equal to pools[poolId]
in the function.
Replacing 2 warm SLOADs (100 gas) with 2 MLOADs (3 gas) saves 194 gas here. Additionally, the gas cost of reading from an array is avoided.
Change pools[poolId]
to pool
on lines 262 and 263
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.