From 60146fa8cc15d3e09efb8bc214c72634b66fa191 Mon Sep 17 00:00:00 2001 From: clemlak Date: Fri, 26 Apr 2024 18:37:51 +0200 Subject: [PATCH] feat: change rounding direction in NTokenG3MSolver --- src/NTokenGeometricMean/NTokenGeometricMeanSolver.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NTokenGeometricMean/NTokenGeometricMeanSolver.sol b/src/NTokenGeometricMean/NTokenGeometricMeanSolver.sol index 3ce42100..2c7d7e37 100644 --- a/src/NTokenGeometricMean/NTokenGeometricMeanSolver.sol +++ b/src/NTokenGeometricMean/NTokenGeometricMeanSolver.sol @@ -17,7 +17,7 @@ import { computeDeallocationDeltasGivenDeltaT, computeNextLiquidity, computeSwapDeltaLiquidity, - computeDeltaGivenDeltaLRoundUp + computeDeltaGivenDeltaLRoundDown } from "src/NTokenGeometricMean/NTokenGeometricMeanMath.sol"; import { ISolver, @@ -102,7 +102,7 @@ contract NTokenGeometricMeanSolver is ISolver { uint256[] memory deltas = new uint256[](length); for (uint256 i = 0; i < length; i++) { - deltas[i] = computeDeltaGivenDeltaLRoundUp( + deltas[i] = computeDeltaGivenDeltaLRoundDown( reserves[i], deltaLiquidity, totalLiquidity ); }