The calculateLiquidityRate function calculates the net liquidity rate by subtracting a protocol fee from a gross liquidity rate. However, if the protocol fee rate is misconfigured or set too high, it can cause an underflow during subtraction, leading to a revert.
If protocolFeeRate is set higher than 1 RAY(1e27) (i.e., above the expected maximum), then protocolFeeAmount may exceed grossLiquidityRate. This subtraction would underflow, causing the transaction to revert.
Transaction Reverts:
Underflow during subtraction leads to reverts, which can disrupt interest rate calculations and overall protocol functionality.
Economic Disruption:
Inaccurate liquidity rates may result in mispriced interest rates, potentially distorting the incentives for depositors and borrowers.
manual review
Enforce that protocolFeeRate is within the expected range (0 to 1 RAY) by adding appropriate checks (e.g., a require statement) before performing calculations.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.