Submitted by rayn, also found by hake
NFTLoanFacilitator.sol#L205-L208
NFTLoanFacilitator.sol#L215-L218
If an attacker (lender) lends to a loan, the attacker can always revert transactions when any lenders try to buyout, making anyone can not buyout the loan of the attacker.
In _callTokensReceived, the attacker just wants to revert the buyout transaction, but keep repayAndCloseLoan successful. The attacker can call loanInfoStruct(uint256 loanId) in _callTokensReceived to check if the value of loanInfo is changed or not to decide to revert it.
vim
Dont transfer ERC20(loanAssetContractAddress) to currentLoanOwner in lend(), use a global mapping to record redemption of lenders and add an external function redeem for lenders to transfer ERC20(loanAssetContractAddress).
wilsoncusack (Backed Protocol) acknowledged, but disagreed with High severity and commented:
wilsoncusack (Backed Protocol) confirmed and commented:
gzeon (judge) decreased severity to Medium and commented:
wilsoncusack (Backed Protocol) commented:
gzeon (judge) commented:
wilsoncusack (Backed Protocol) resolved
