From 52571e9a750e8be55e31e8b07403860258a57d16 Mon Sep 17 00:00:00 2001 From: lucas-manuel Date: Mon, 8 Jul 2024 15:19:11 +0200 Subject: [PATCH] fix: review changes --- test/unit/SwapExactIn.t.sol | 6 +++--- test/unit/SwapExactOut.t.sol | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/unit/SwapExactIn.t.sol b/test/unit/SwapExactIn.t.sol index 95c48d1..f18d2e7 100644 --- a/test/unit/SwapExactIn.t.sol +++ b/test/unit/SwapExactIn.t.sol @@ -427,7 +427,7 @@ contract PSMSwapExactInFuzzTests is PSMTestBase { assetIn.approve(address(psm), amountIn); psm.swapExactIn(address(assetIn), address(assetOut), amountIn, 0, swapper, 0); - // Rounding is always in favour of the users + // Rounding is always in favour of the LPs assertGe(psm.convertToAssetValue(psm.shares(lp0)), vars.lp0CachedValue); assertGe(psm.convertToAssetValue(psm.shares(lp1)), vars.lp1CachedValue); assertGe(psm.convertToAssetValue(psm.shares(lp2)), vars.lp2CachedValue); @@ -437,10 +437,10 @@ contract PSMSwapExactInFuzzTests is PSMTestBase { assertApproxEqAbs(psm.convertToAssetValue(psm.shares(lp0)), vars.lp0CachedValue, 2e12); assertApproxEqAbs(psm.convertToAssetValue(psm.shares(lp1)), vars.lp1CachedValue, 2e12); assertApproxEqAbs(psm.convertToAssetValue(psm.shares(lp2)), vars.lp2CachedValue, 2e12); - assertApproxEqAbs(psm.totalAssets(), vars.psmCachedValue, 2e12); + assertApproxEqAbs(psm.totalAssets(), vars.psmCachedValue, 2e12); } - // Rounding is always in favour of the users + // Rounding is always in favour of the LPs assertGe(psm.convertToAssetValue(psm.shares(lp0)), vars.lp0StartingValue); assertGe(psm.convertToAssetValue(psm.shares(lp1)), vars.lp1StartingValue); assertGe(psm.convertToAssetValue(psm.shares(lp2)), vars.lp2StartingValue); diff --git a/test/unit/SwapExactOut.t.sol b/test/unit/SwapExactOut.t.sol index 40273bc..13e9252 100644 --- a/test/unit/SwapExactOut.t.sol +++ b/test/unit/SwapExactOut.t.sol @@ -473,7 +473,7 @@ contract PSMSwapExactOutFuzzTests is PSMTestBase { assetIn.approve(address(psm), amountIn); psm.swapExactOut(address(assetIn), address(assetOut), amountOut, amountIn, swapper, 0); - // Rounding is always in favour of the users + // Rounding is always in favour of the LPs assertGe(psm.convertToAssetValue(psm.shares(lp0)), vars.lp0CachedValue); assertGe(psm.convertToAssetValue(psm.shares(lp1)), vars.lp1CachedValue); assertGe(psm.convertToAssetValue(psm.shares(lp2)), vars.lp2CachedValue); @@ -486,7 +486,7 @@ contract PSMSwapExactOutFuzzTests is PSMTestBase { assertApproxEqAbs(psm.totalAssets(), vars.psmCachedValue, 2e12); } - // Rounding is always in favour of the users + // Rounding is always in favour of the LPs assertGe(psm.convertToAssetValue(psm.shares(lp0)), vars.lp0StartingValue); assertGe(psm.convertToAssetValue(psm.shares(lp1)), vars.lp1StartingValue); assertGe(psm.convertToAssetValue(psm.shares(lp2)), vars.lp2StartingValue);