Confusing comments
Lender.sol lines 167-175
if (pools[poolId].lender == address(0)) {
// if the pool doesn't exist then create it
emit PoolCreated(poolId, p);
} else {
// if the pool does exist then update it
emit PoolUpdated(poolId, p);
}
pools[poolId] = p;
The pool is updated outside of the blocks--> pools[poolId] = p;
However the comments -> // if the pool doesn't exist then create it ---makes it seem as if in this if block a pool must be created when in actual fact its an event emitted
However the comments -> // if the pool does exist then update it ----it makes it seem as if in this if block a pool must be created when in actual fact its an event emitted
The comments make it seem as if some creation code or update code is missing in the if,else blocks
Informational: This affects code readability, interpretability, maintenance, auditability and can even introduce errors as dev working on project may think there needs to be some creation functions in the if, else blocks
Manual Analysis
It is recommended to remove the confusing comments or reword them to be appropriate
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.