The deleteHolder
function is designed to remove a holder's address from the holders array. The current implementation continues to iterate over the array even after the holder has been successfully removed. This is inefficient as it unnecessarily consumes gas and does not align with the assumption that an address can only exist once in the holders array.
https://github.com/Cyfrin/2023-12-the-standard/blob/91132936cb09ef9bf82f38ab1106346e2ad60f91/contracts/LiquidationPool.sol#L96C4-L103C6
Manual Review
it is recommended to terminate the loop immediately after the holder is removed.
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.