Giving a loan to a new pool is removing totalDebt that is incorrect
Updating the balance of the new pool is removing the total Debt that is the sum of loan.debt + lenderInterest + protocolInterest, but it needs to be only the loan.debt. This way from loan.debt(e.g. 1000 tokens) the user will get new debt which will be 1050.
Loss of funds
Manual Review
Give the user only loan.debt, and remove from the poolBalance only loan.debt not totalDebt
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.