Borrower can get more loan tokens and collateral after refinancing.
If a malicious borrower refinancing his loan to a new pool, he can get more loan tokens if he increases its debt than the debtToPay because the transfer function sends debt - debtToPay - fee to the borrower and if the borrower is malicious he can cause reentrancy attack and again call the same function and get some more loan tokens because the updates are made after the transfers of the tokens.Similiarly if we decrease our collateral we pull the attack exactly similar to the attack pulled off by increasing the debt.
Causes loss of collateral token as well as loan tokens from the lender.sol
Manual
First make the updates and then make exeternal calls for transferring of the tokens.
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.