Open c4-bot-9 opened 5 months ago
The protocol fee value is recorded and stored in the Loan struct when a new loan is issued. However, the addNewTranche() does not use it.
addNewTranche()
The fix is changing from using protocolFee.fraction to _loan.protocolFee.
protocolFee.fraction
_loan.protocolFee
- _renegotiationOffer.fee.mulDivUp(protocolFee.fraction, _PRECISION) + _renegotiationOffer.fee.mulDivUp(_loan.protocolFee, _PRECISION)
alex-ppg marked the issue as satisfactory
Lines of code
Vulnerability details
Issue
The protocol fee value is recorded and stored in the Loan struct when a new loan is issued. However, the
addNewTranche()
does not use it.Mitigation
The fix is changing from using
protocolFee.fraction
to_loan.protocolFee
.