Open GalloDaSballo opened 2 months ago
_calcBorrowingRate is using min(X + Y, X) meaning it will always return X in this case borrowingFeeFloor
_calcBorrowingRate
min(X + Y, X)
X
borrowingFeeFloor
Change
function _calcBorrowingRate(uint _stableCoinBaseRate) internal view returns (uint) { return LiquityMath._min(borrowingFeeFloor + _stableCoinBaseRate, borrowingFeeFloor); }
To
function _calcBorrowingRate(uint _stableCoinBaseRate) internal view returns (uint) { return LiquityMath._min(borrowingFeeFloor + _stableCoinBaseRate, 1e18); }
Impact
_calcBorrowingRate
is usingmin(X + Y, X)
meaning it will always returnX
in this caseborrowingFeeFloor
Mitigation
Change
To