Status DataClose notification

Kinetic Disclosed Report

Audit Report

Borrow Rate Exceeding borrowRateMaxMantissa Can Cause Protocol Failure

Target

https://github.com/kinetic-market/public-money-market-contracts

Vulnerability details

Description

In the Ctoken protocol, the accrueInterest function includes the following check:

/* Calculate the current borrow interest rate */
uint borrowRateMantissa = interestRateModel.getBorrowRate(cashPrior, borrowsPrior, reservesPrior);
require(borrowRateMantissa <= borrowRateMaxMantissa, "borrow rate is absurdly high");

This check ensures that if the borrow interest rate exceeds the borrowRateMaxMantissa, the transaction reverts with an error. However, if the borrow interest rate actually exceeds borrowRateMaxMantissa, the protocol will not be able to process the transaction, causing a crash. As a result, all funds in the protocol will be locked, as the accrueInterest function is called before most operations. This means that users will not be able to perform any further actions within the protocol, effectively freezing all activity.This scenario is particularly problematic in environments with low liquidity, where fluctuations in the borrow rate can easily push it beyond the maximum limit. This could happen due to either user errors or malicious attacks that manipulate the interest rate.

Recommendation

The correct approach would be to prevent new borrowings rather than reverting the interest calculation when the borrow interest rate exceeds the borrowRateMaxMantissa.

Validation steps

https://github.com/kinetic-market/public-money-market-contracts/blob/d46f5223344ff6502349549ad858588e496483df/contracts/CToken.sol#L399

Comments are hidden

This information is not publicly available.