diff --git a/src/ConstantSum/ConstantSumMath.sol b/src/ConstantSum/ConstantSumMath.sol index a95ba4b2..6f4835de 100644 --- a/src/ConstantSum/ConstantSumMath.sol +++ b/src/ConstantSum/ConstantSumMath.sol @@ -6,7 +6,6 @@ import { ConstantSumParams } from "src/ConstantSum/ConstantSum.sol"; import { ONE } from "src/lib/StrategyLib.sol"; using FixedPointMathLib for uint256; -using FixedPointMathLib for int256; function computeTradingFunction( uint256[] memory reserves, diff --git a/src/ConstantSum/ConstantSumSolver.sol b/src/ConstantSum/ConstantSumSolver.sol index 95ca306e..644a2e77 100644 --- a/src/ConstantSum/ConstantSumSolver.sol +++ b/src/ConstantSum/ConstantSumSolver.sol @@ -20,7 +20,6 @@ contract ConstantSumSolver { error NotEnoughLiquidity(); using FixedPointMathLib for uint256; - using FixedPointMathLib for int256; struct Reserves { uint256 rx; diff --git a/src/ConstantSum/ConstantSumUtils.sol b/src/ConstantSum/ConstantSumUtils.sol index 12064357..71b98d25 100644 --- a/src/ConstantSum/ConstantSumUtils.sol +++ b/src/ConstantSum/ConstantSumUtils.sol @@ -20,7 +20,6 @@ function encodeControllerUpdate(address controller) function decodeFeeUpdate(bytes memory data) pure returns (uint256 swapFee) { (, swapFee) = abi.decode(data, (UpdateCode, uint256)); - return swapFee; } function decodePriceUpdate(bytes memory data) diff --git a/src/LogNormal/LogNormalMath.sol b/src/LogNormal/LogNormalMath.sol index e3c1fe78..801e6c33 100644 --- a/src/LogNormal/LogNormalMath.sol +++ b/src/LogNormal/LogNormalMath.sol @@ -22,7 +22,7 @@ function computeTradingFunction( LogNormalParams memory params ) pure returns (int256) { int256 a = Gaussian.ppf(int256(rX.divWadDown(L))); - int256 b = Gaussian.ppf(int256(rY.divWadDown(L.mulWadUp(params.mean)))); + int256 b = Gaussian.ppf(int256(rY.divWadDown(L.mulWadDown(params.mean)))); return a + b + int256(params.width); } diff --git a/src/NTokenGeometricMean/NTokenGeometricMean.sol b/src/NTokenGeometricMean/NTokenGeometricMean.sol index 14dffa28..4cccb342 100644 --- a/src/NTokenGeometricMean/NTokenGeometricMean.sol +++ b/src/NTokenGeometricMean/NTokenGeometricMean.sol @@ -70,7 +70,6 @@ contract NTokenGeometricMean is NTokenStrategy { int256 invariant; address controller; uint256 swapFee; - uint256 wX; uint256 totalLiquidity; uint256[] reserves; uint256[] weights; diff --git a/src/lib/StrategyLib.sol b/src/lib/StrategyLib.sol index d1d60387..03f733ed 100644 --- a/src/lib/StrategyLib.sol +++ b/src/lib/StrategyLib.sol @@ -6,9 +6,6 @@ import { FixedPointMathLib } from "solmate/utils/FixedPointMathLib.sol"; uint256 constant HALF = 0.5e18; uint256 constant ONE = 1e18; uint256 constant TWO = 2e18; -int256 constant I_ONE = int256(ONE); -int256 constant I_TWO = int256(TWO); -int256 constant I_HALF = int256(HALF); using FixedPointMathLib for uint256; using FixedPointMathLib for int256; diff --git a/test/utils/LogNormalArbitrage.sol b/test/utils/LogNormalArbitrage.sol index 811551a7..087de234 100644 --- a/test/utils/LogNormalArbitrage.sol +++ b/test/utils/LogNormalArbitrage.sol @@ -34,6 +34,10 @@ interface SolverLike { returns (LogNormalParams memory); } +int256 constant I_ONE = int256(ONE); +int256 constant I_TWO = int256(TWO); +int256 constant I_HALF = int256(HALF); + contract LogNormalArbitrage { using FixedPointMathLib for uint256; using FixedPointMathLib for int256;