diff --git a/contracts/protocol/libraries/configuration/ReserveConfiguration.sol b/contracts/protocol/libraries/configuration/ReserveConfiguration.sol index 36498bcd9..b29007156 100644 --- a/contracts/protocol/libraries/configuration/ReserveConfiguration.sol +++ b/contracts/protocol/libraries/configuration/ReserveConfiguration.sol @@ -42,7 +42,6 @@ library ReserveConfiguration { uint256 internal constant BORROWABLE_IN_ISOLATION_START_BIT_POSITION = 61; uint256 internal constant SILOED_BORROWING_START_BIT_POSITION = 62; uint256 internal constant FLASHLOAN_ENABLED_START_BIT_POSITION = 63; - uint256 internal constant RESERVE_FACTOR_START_BIT_POSITION = 64; uint256 internal constant BORROW_CAP_START_BIT_POSITION = 80; uint256 internal constant SUPPLY_CAP_START_BIT_POSITION = 116; diff --git a/contracts/protocol/libraries/logic/LiquidationLogic.sol b/contracts/protocol/libraries/logic/LiquidationLogic.sol index 42c896001..aea05b760 100644 --- a/contracts/protocol/libraries/logic/LiquidationLogic.sol +++ b/contracts/protocol/libraries/logic/LiquidationLogic.sol @@ -199,7 +199,9 @@ library LiquidationLogic { // Transfer fee to treasury if it is non-zero if (vars.liquidationProtocolFeeAmount != 0) { uint256 liquidityIndex = collateralReserve.getNormalizedIncome(); - uint256 scaledDownLiquidationProtocolFee = vars.liquidationProtocolFeeAmount.rayDiv(liquidityIndex); + uint256 scaledDownLiquidationProtocolFee = vars.liquidationProtocolFeeAmount.rayDiv( + liquidityIndex + ); uint256 scaledDownUserBalance = vars.collateralAToken.scaledBalanceOf(params.user); // To avoid trying to send more aTokens than available on balance, due to 1 wei imprecision if (scaledDownLiquidationProtocolFee > scaledDownUserBalance) { @@ -211,7 +213,7 @@ library LiquidationLogic { vars.liquidationProtocolFeeAmount ); } - + // Transfers the debt asset being repaid to the aToken, where the liquidity is kept IERC20(params.debtAsset).safeTransferFrom( msg.sender, diff --git a/contracts/protocol/libraries/logic/ReserveLogic.sol b/contracts/protocol/libraries/logic/ReserveLogic.sol index a7b563c95..c73655f18 100644 --- a/contracts/protocol/libraries/logic/ReserveLogic.sol +++ b/contracts/protocol/libraries/logic/ReserveLogic.sol @@ -350,10 +350,8 @@ library ReserveLogic { reserveCache.reserveLastUpdateTimestamp = reserve.lastUpdateTimestamp; reserveCache.currScaledVariableDebt = reserveCache.nextScaledVariableDebt = IVariableDebtToken( - reserveCache - .variableDebtTokenAddress - ) - .scaledTotalSupply(); + reserveCache.variableDebtTokenAddress + ).scaledTotalSupply(); ( reserveCache.currPrincipalStableDebt, diff --git a/test-suites/stable-debt-token-events.spec.ts b/test-suites/stable-debt-token-events.spec.ts index 15534445c..6ab5dc492 100644 --- a/test-suites/stable-debt-token-events.spec.ts +++ b/test-suites/stable-debt-token-events.spec.ts @@ -215,11 +215,6 @@ makeSuite('StableDebtToken: Events', (testEnv: TestEnv) => { aliceBalanceBefore.add(balances.balance[alice.address]), 2 ); - log( - 'check', - aliceBalanceAfter.toString(), - aliceBalanceBefore.add(balances.balance[alice.address]).toString() - ); }; it('Alice borrows 100 DAI, Bob borrows 100 DAI, Alice borrows 50 DAI, repays 150 DAI and repays 100 DAI on behalf of Bob, borrows 10 DAI more (without index change)', async () => {