Lender.seizeLoan is not honest to the lender, because it takes fee from all collateral amount
When borrower takes new loan, then he provides some amount of collateral that will be locked and can be seized if noone bought loan.
When lender seizeLoan, then this collateral is sent to him, except protocol fee, which is accrued from all collateral amount. This is incorrect, because protocol should receive fees only from accrued interests and not from whole amount. And in some cases it can be a loss for lender.
For example, collateral price has dropped, so when lender seizes collateral amount is about debt amount, but protocol takes its percentage.
Lender can have a loss
VsCode
Honest approach needs oracle to evaluate amount of accrued interests and send appropriate collateral to protocol.
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.