use getPoolId
poolId oldPoolId to be sure in case you change something in getPoolId
function it will apply the change in the whole contract.
example:
bytes32 poolId = keccak256(abi.encode(loan.lender, loan.loanToken, loan.collateralToken));
to
bytes32 poolId = getPoolId(loan.lender, loan.loanToken, loan.collateralToken);
cache the length i.e: uint256 l = loandIds.length
example: for(uint i; i < loandIds.length; ++i)
=> uint l = loandIds.length;
for(uint i; i < l; ++i)
If a variable is not set, it has the default value 0
. it is anti-pattern and wastes gas.
example: for(uint i=0; i < l, i++)
=> for(uint i; i < l; ++i)
using ++i
costs less gas then i++
, about 5 gas per iteration.
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.