linted
This commit is contained in:
@@ -711,7 +711,7 @@ contract LMSRStabilizedTest is Test {
|
||||
}
|
||||
|
||||
// Path 1: Direct swap from asset 0 to asset 2
|
||||
(int128 directAmountIn, int128 directAmountOut) = s.swapAmountsForExactInput(0, 2, directSwapAmount, 0);
|
||||
(/*int128 directAmountIn*/, int128 directAmountOut) = s.swapAmountsForExactInput(0, 2, directSwapAmount, 0);
|
||||
|
||||
// Restore original state for second path
|
||||
_updateCachedQInternal(backupQ);
|
||||
@@ -724,7 +724,7 @@ contract LMSRStabilizedTest is Test {
|
||||
s.qInternal[1] = s.qInternal[1].add(indirectAmountOut1);
|
||||
|
||||
// Second swap: asset 1 -> asset 2
|
||||
(int128 indirectAmountIn2, int128 indirectAmountOut2) = s.swapAmountsForExactInput(1, 2, indirectAmountOut1, 0);
|
||||
(/*int128 indirectAmountIn2*/, int128 indirectAmountOut2) = s.swapAmountsForExactInput(1, 2, indirectAmountOut1, 0);
|
||||
|
||||
// The path independence property isn't perfect due to discrete swap mechanics,
|
||||
// but the difference should be within reasonable bounds
|
||||
@@ -765,7 +765,7 @@ contract LMSRStabilizedTest is Test {
|
||||
s.qInternal[1] = s.qInternal[1].add(amountOut1);
|
||||
|
||||
// Step 2: Swap back asset 1 -> asset 0
|
||||
(int128 amountIn2, int128 amountOut2) = s.swapAmountsForExactInput(1, 0, amountOut1, 0);
|
||||
(/*int128 amountIn2*/, int128 amountOut2) = s.swapAmountsForExactInput(1, 0, amountOut1, 0);
|
||||
|
||||
// Calculate round-trip slippage: (initial amount - final amount) / initial amount
|
||||
int128 roundTripSlippage = (amountIn1.sub(amountOut2)).div(amountIn1);
|
||||
|
||||
Reference in New Issue
Block a user