Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavidmeister committed Aug 29, 2023
1 parent 4758321 commit f7eb4f2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 50 deletions.
49 changes: 0 additions & 49 deletions src/concrete/OrderBook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -722,55 +722,6 @@ contract OrderBook is IOrderBookV3, ReentrancyGuard, Multicall, OrderBookV3Flash
calculateClearStateAlice(clearStateChange, aliceOrderIOCalculation, bobOrderIOCalculation);
// Flip alice and bob to calculate bob's output.
calculateClearStateAlice(clearStateChange, bobOrderIOCalculation, aliceOrderIOCalculation);
// {
// // This is the max input that bob can afford, given his own IO ratio
// // and maximum spend/output.
// Input18Amount bobInputMax18 = calculateInputFromIORatio(
// bobOrderIOCalculation.outputMax,
// bobOrderIOCalculation.IORatio
// );
// Output18Amount aliceOutputMax18 = aliceOrderIOCalculation.outputMax;
// // Alice's doesn't need to provide more output than bob's max input.
// if (Output18Amount.unwrap(aliceOutputMax18) > Input18Amount.unwrap(bobInputMax18)) {
// aliceOutputMax18 = Output18Amount.wrap(Input18Amount.unwrap(bobInputMax18));
// }
// // Alice's final output is the scaled version of the 18 decimal output,
// // rounded down to benefit Alice.
// clearStateChange.aliceOutput = OutputTknAmount.wrap(Output18Amount.unwrap(aliceOutputMax18).scaleN(
// aliceOrderIOCalculation.outputDecimals,
// 0
// ));
// }

// {
// // Bob's output

// }

// // Alice's output is the smaller of their max output and Bob's input.
// clearStateChange.aliceOutput = aliceOrderIOCalculation.outputMax.min(
// // Bob's input is Alice's output.
// // Alice cannot output more than their max.
// // Bob wants input of their IO ratio * their output.
// // Always round IO calculations up.
// bobOrderIOCalculation.outputMax.fixedPointMul(bobOrderIOCalculation.IORatio, Math.Rounding.Up)
// );
// Bob's output is the smaller of their max output and Alice's input.
// clearStateChange.bobOutput = bobOrderIOCalculation.outputMax.min(
// // Alice's input is Bob's output.
// // Bob cannot output more than their max.
// // Alice wants input of their IO ratio * their output.
// // Always round IO calculations up.
// aliceOrderIOCalculation.outputMax.fixedPointMul(aliceOrderIOCalculation.IORatio, Math.Rounding.Up)
// );
// Alice's input is Alice's output * their IO ratio.
// Always round IO calculations up.
// clearStateChange.aliceInput =
// clearStateChange.aliceOutput.fixedPointMul(aliceOrderIOCalculation.IORatio, Math.Rounding.Up);
// // Bob's input is Bob's output * their IO ratio.
// // Always round IO calculations up.
// clearStateChange.bobInput =
// clearStateChange.bobOutput.fixedPointMul(bobOrderIOCalculation.IORatio, Math.Rounding.Up);
}

function calculateClearStateAlice(
Expand Down
1 change: 0 additions & 1 deletion test/concrete/OrderBook.takeOrder.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,5 @@ contract OrderBookTakeOrderTest is OrderBookExternalRealTest {
checkPrecision(knownBad, 6, 20, 157116365680, 4999999999984331501400);
checkPrecision(knownBad, 6, 21, 157116365680, 49999999999843315014000);
checkPrecision(knownBad, 6, 50, 157116365680, 4999999999984331501400000000000000000000000000000000);

}
}

0 comments on commit f7eb4f2

Please sign in to comment.