loans
is array. It 's dangerous because of it may cause borrower to repay wrong loan
For example:
Alice have a loan and loan ID is 15,and the loans.length = 16
Bob have a loan and loan ID is 14,and the loans.length = 16
Now Bob repay his loan,and his loans[14] will delete.
So now Alice loan ID will change be 14 rather than 15.
If Alice repay loan[15], it will cause error and revert.
More seriously,if init loans.length = 20, now Alice repaying loan[15] , this is ridiculous,because the loan[15] is another one 's loan.
It may cause borrower to repay wrong loan
manual
change loans as mapping such like pools
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.