In LendingPool contract there is unnecessary scaling of the user debt. It also they are maked some math operations that they are not used.
In Lending Pool contract in _repay function
variable userDebt is already scaled, because of calling the function balanceOf() from DebtToken contract. If the amount comes greater than userScaledDebt, actualRepayAmount will be scaled twice, because of userScaledDebt.
scaledAmount is scaling againg the actualRepayAmount. I see that these variables are not used but it will cost more gas.
Gas efficiency
If you want to use this functionallity for future you can comment out this part of code to save some gas. And also to fix it you should remove userScaledDebt variable and rename userDebt like this:
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.