Issue:
In ReserveLibrary::calculateLiquidityIndex, the final value is downcast to uint128 after rayMul(lastIndex):
Remember that calculateLinearInterest returns uint256:
Back to calculateLiquidityIndex, since rayMul maintains RAY (1e27) precision, this can cause truncation or overflow if the result exceeds uint128 max (2^128 - 1).
Impact: Potential loss of accrued interest, incorrect liquidity index updates
Recommendation:
Ensure safe downcasting
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.