- Relax condition on cumulateToLiquidityIndex()

This commit is contained in:
eboado 2020-11-26 15:41:28 +01:00
parent e1f636ccd6
commit 977a25aee2

View File

@ -150,7 +150,7 @@ library ReserveLogic {
uint256 result = amountToLiquidityRatio.add(WadRayMath.ray());
result = result.rayMul(reserve.liquidityIndex);
require(result < type(uint128).max, Errors.RL_LIQUIDITY_INDEX_OVERFLOW);
require(result <= type(uint128).max, Errors.RL_LIQUIDITY_INDEX_OVERFLOW);
reserve.liquidityIndex = uint128(result);
}