From ba845798ab5f620b51c746422d91578fd08c05c8 Mon Sep 17 00:00:00 2001 From: clemlak Date: Thu, 13 Jun 2024 15:01:07 +0400 Subject: [PATCH] fix: use prepareSwapPtIn --- src/RMM.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RMM.sol b/src/RMM.sol index 07b12c0..0b7e15d 100644 --- a/src/RMM.sol +++ b/src/RMM.sol @@ -500,7 +500,7 @@ contract RMM is ERC20 { uint256 max = initialGuess; for (uint256 iter = 0; iter < 100; ++iter) { uint256 guess = (min + max) / 2; - (,, uint256 amountOut,,) = prepareSwapSy(guess, blockTime, index); + (,, uint256 amountOut,,) = prepareSwapPtIn(guess, blockTime, index); uint256 netPtToAccount = index.assetToSyUp(guess); uint256 netPtToPull = netPtToAccount - amountOut;