diff --git a/contracts/libraries/PercentageMath.sol b/contracts/libraries/PercentageMath.sol index e85769b2..0ef4bea4 100644 --- a/contracts/libraries/PercentageMath.sol +++ b/contracts/libraries/PercentageMath.sol @@ -13,7 +13,7 @@ import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; library PercentageMath { using SafeMath for uint256; - uint256 constant PERCENTAGE_FACTOR = 1e2; //percentage plus two decimals + uint256 constant PERCENTAGE_FACTOR = 1e4; //percentage plus two decimals uint256 constant HALF_PERCENT = PERCENTAGE_FACTOR / 2; function percentMul(uint256 value, uint256 percentage) internal pure returns (uint256) { diff --git a/helpers/constants.ts b/helpers/constants.ts index f5be1fe9..efeaca36 100644 --- a/helpers/constants.ts +++ b/helpers/constants.ts @@ -170,9 +170,9 @@ export const getReservesConfigByPool = (pool: AavePools): iMultiPoolsAssets const userGlobalDataAfter = await pool.getUserAccountData(borrower.address); expect(userGlobalDataAfter.currentLiquidationThreshold).to.be.bignumber.equal( - '80', + '8000', 'Invalid liquidation threshold' ); diff --git a/test/liquidation-underlying.spec.ts b/test/liquidation-underlying.spec.ts index be3e0401..34a77ffd 100644 --- a/test/liquidation-underlying.spec.ts +++ b/test/liquidation-underlying.spec.ts @@ -92,7 +92,7 @@ makeSuite('LendingPool liquidation - liquidator receiving the underlying asset', const userGlobalDataAfter: any = await pool.getUserAccountData(borrower.address); expect(userGlobalDataAfter.currentLiquidationThreshold.toString()).to.be.bignumber.equal( - '80', + '8000', 'Invalid liquidation threshold' ); });