code-423n4 / 2024-05-gondi-mitigation-findings

0 stars 0 forks source link

M-18 MitigationConfirmed #83

Open c4-bot-9 opened 3 months ago

c4-bot-9 commented 3 months ago

Lines of code

Vulnerability details

Issue

LoanManager accounting mechanism requires to always call loanRepayment or loanLiquidation to adjust internal accounting values when a loan is terminated. However, the distribute() did not call it when it can't repay all lenders.

Mitigation

The distribute() function now always calls loanLiquidation() for internal accounting of LoanManager.

c4-judge commented 3 months ago

alex-ppg marked the issue as satisfactory