Submitted by cmichel
NFTLoanFacilitator.sol#L241
The repayAndCloseLoan function does not revert if there has not been a lender for a loan (matched with lend).
Users should use closeLoan in this case but the contract should disallow calling repayAndCloseLoan because users can lose funds.
It performs a ERC20(loan.loanAssetContractAddress).safeTransferFrom(msg.sender, lender, interest + loan.loanAmount) call where interest will be a high value accumulated from timestamp 0 and the loan.loanAmount is the initially desired min loan amount minLoanAmount set in createLoan.
The user will lose these funds if they ever approved the contract (for example, for another loan).
Add a check that there actually is something to repay.
wilsoncusack (Backed Protocol) commented:
wilsoncusack (Backed Protocol) confirmed and commented:
wilsoncusack (Backed Protocol) commented:
wilsoncusack (Backed Protocol) resolved and commented:
gzeon (judge) commented:
