Perhaps the developer intended that the repaying individual can repay for anyone. The loanIds encompass a series of loans, but if the loanId is entered incorrectly, it may lead to paying for someone else's loan. Therefore, I believe here the collateral should be transferred to msg.sender, who is the person repaying, rather than the borrower.
lost of loanToken after invoking repay.
manual
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.