_repayLoan will fail if lender is blacklisted
The internal function that repays a loan `_repayLoan` attempts to transfer the loan token back to the lender. If the loan token implements a blacklist like the common USDC token, the transfer may be impossible and the repayment will fail.\\nThis internal `_repayLoan` function is called during any partial / full repayment and during liquidation.\\nThe function to repay the loan to the lender directly transfers the token to the lender:\\n```\\n    function _repayLoan(// rest of code) internal virtual {\\n        // rest of code\\n        bid.loanDetails.lendingToken.safeTransferFrom(\\n            _msgSenderForMarket(bid.marketplaceId),\\n            lender,\\n            paymentAmount\\n        );\\n        // rest of code\\n```\\n\\nAny of these functions will fail if loan lender is blacklisted by the token.\\nDuring repayment the loan lender is computed by:\\n```\\n    function getLoanLender(uint256 _bidId)\\n        public\\n        view\\n        returns (address lender_)\\n    {\\n        lender_ = bids[_bidId].lender;\\n\\n        if (lender_ == address(lenderManager)) {\\n            return lenderManager.ownerOf(_bidId);\\n        }\\n    }\\n```\\n\\nIf the lender controls a blacklisted address, they can use the lenderManager to selectively transfer the loan to / from the blacklisted whenever they want.
Use a push/pull pattern for transferring tokens. Allow repayment of loan and withdraw the tokens of the user into `TellerV2` (or an escrow) and allow lender to withdraw the repayment from `TellerV2` (or the escrow). This way, the repayment will fail only if `TellerV2` is blacklisted.
Any lender can prevent repayment of a loan and its liquidation. In particular, a lender can wait until a loan is almost completely repaid, transfer the loan to a blacklisted address (even one they do not control) to prevent the loan to be fully repaid / liquidated. The loan will default and borrower will not be able to withdraw their collateral.\\nThis result in a guaranteed griefing attack on the collateral of a user.\\nIf the lender controls a blacklisted address, they can additionally withdraw the collateral of the user.\\nI believe the impact is high since the griefing attack is always possible whenever lent token uses a blacklist, and results in a guaranteed loss of collateral.
```\\n    function _repayLoan(// rest of code) internal virtual {\\n        // rest of code\\n        bid.loanDetails.lendingToken.safeTransferFrom(\\n            _msgSenderForMarket(bid.marketplaceId),\\n            lender,\\n            paymentAmount\\n        );\\n        // rest of code\\n```\\n