From 65bcd8ea791f4c70452768e4ebe15efd8f1430b6 Mon Sep 17 00:00:00 2001 From: grandizzy <38490174+grandizzy@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:36:23 +0200 Subject: [PATCH] Do not recalculate new pool debt already in poolState struct (#662) --- src/libraries/external/PoolCommons.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/external/PoolCommons.sol b/src/libraries/external/PoolCommons.sol index 2ea3f6b3e..75a72b522 100644 --- a/src/libraries/external/PoolCommons.sol +++ b/src/libraries/external/PoolCommons.sol @@ -100,7 +100,7 @@ library PoolCommons { poolState_.inflator, vars.t0Debt2ToCollateral ); - vars.newDebt = Maths.wmul(poolState_.inflator, poolState_.t0Debt); + vars.newDebt = poolState_.debt; vars.newDebtCol = Maths.wmul(poolState_.inflator, vars.t0Debt2ToCollateral); vars.newLupt0Debt = Maths.wmul(lup_, poolState_.t0Debt);