Calm Pine Robin
High
the interest model, interestratemodel calculates the utilization rate as follows:
function utilizationRate(
uint cash,
uint borrows,
uint reserves
) public pure override returns (uint) {
// Utilization rate is 0 when there are no borrows
if (borrows == 0) {
return 0;
}
return (borrows * 1e18) / (cash + borrows - reserves);
}
This formula is applicable in other markets because the reserves represent fees earned by the protocol, which are included in the cash value (as tokens held by the market). However, these reserves should not be factored into the utilization rate since they are owned by the protocol and cannot be borrowed
In the case of the this market, however, this is not true. The reserves value increases as interest accrues, but it represents the number of CTokens that can be claimed in the interest market. As a result, it does not affect the utilization rate
as reserves increase this value will play a larger and larger role in the utilization rate calculation, which can cause major problems:
As reserves
gets larger, the utilization rate will increase, causing interest rates to grow. which will cause the borrowers to pay a very high interest rates
Utilization rates are intended to be capped at 1e18 ([see Compound code comment](https://github.com/compound-finance/compound-protocol/blob/a3214f67b73310d547e00fc578e8355911c9d376/contracts/BaseJumpRateModelV2.sol#L78)), whereas our value can go much higher
In most Compound forks, the supply rate is calculated primarily for convenience. However, in this market, it plays a crucial role in manually calculating the increase in the supply interest index, making it essential for the calculation to be accurate. This value is computed as
uint rateToPool = (borrowRate * oneMinusReserveFactor) / 1e18;
return (utilizationRate(cash, borrows, reserves) * rateToPool) / 1e18;
}
}
When the utilization rate is calculated to be very high (near or above 1e18), it will exaggerate the supply rate because the supply rate depends on the utilization rate.
If the utilization rate goes above 1e18, it causes the supply rate to become much larger than the borrow rate. In effect, protocol will receive an interest rate that is disproportionately high compared to what is actually borrowed. which will be unfair for the borrowers
the supply rate represent the interest earned by the prtocol. When the supply rate exceeds the borrow rate, the protocol essentially starts charging more interests than it receives from borrowers. This is unsustainable and can lead to insolvency since high interest rate will lead to borrowers not repaying loan which might be beneficial for them while there position will accrue more and more interest leading to a virtual balance buildup since the exchange rate is also increased as the interest on borrows increase
https://github.com/sherlock-audit/2024-12-numa-audit/blob/main/Numa/contracts/lending/JumpRateModelVariable.sol#L194C4-L220C6 https://github.com/sherlock-audit/2024-12-numa-audit/blob/main/Numa/contracts/lending/JumpRateModelVariable.sol#L91-L102 No response
No response
No response
No response
If reserves grow and the utilization rate becomes much higher (say, near 1e18), the supply rate will increase dramatically. For instance, if the utilization rate approaches 1 the interest will also increase on the borrow while this is a problem itself causing the borrowers to pay a very high interest rate this will also impact the exchange rate to increase causing protocol to pay out stakers through inflated exchange rate
imagine a scenario
- suppose there is a large amount of reserves in the protocol eg 50000 but the actual borrowing is very low 1000 in this case the utilization rate can become very high This can lead to an artificially high supply rate, which is calculated by multiplying the borrow rate by the utilization rate
- When the utilization rate becomes very high, the supply rate also becomes extremely high due to the way it is calculated.
- if the supply rate is very high the interest and exchange rate will also be inflated However, this high supply rate does not correspond to actual borrowing activity—it is inflated due to the large reserves.
- Since the interest paid to stakers is based on the inflated supply rate, more interest is generated than is being paid to the borrowers leading to solvency issues this could also lead to the loss of funds for users or force the protocol to liquidate users who have borrowed funds No response
can be mitigated by removinmg reserves from utilization rate calculation