20,000 USDC
View results
Submission Details
Severity: medium

Lender.seizeLoan is not honest to the lender

Summary

Lender.seizeLoan is not honest to the lender, because it takes fee from all collateral amount

Vulnerability Details

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.

Impact

Lender can have a loss

Tools Used

VsCode

Recommendations

Honest approach needs oracle to evaluate amount of accrued interests and send appropriate collateral to protocol.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.