The borrow() function in the contract does not validate that the borrows[i].debt parameter provided is not zero.
The borrow function lacks validation for the borrows[i].debt input parameters. This could lead to edge cases where the loan has a zero value for borrows[i].debt.
The impact of this vulnerability is that it could lead to unexpected behaviours in the smart contract, such as the creation of loans with zero debt. This could potentially disrupt the normal functioning of the contract and lead to financial losses
Manual Review
Add a check to ensure that borrows[i].debt is greater than zero.
Whilst this can be guarded on the frontend inputs, and I have seen via public commentary on Twitter that checks such as these should be disregarded to save gas, the ultimate checks are the smart contracts and the guard rails should ultimately be set here
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.