aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-08-25 09:09:32 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-08-25 09:20:26 +0800
commitec2e726be0a653465d3c83e640aa4c1556a0f10f (patch)
tree2d5b38f738fb37c1bf0b9e132ce90a6f3b490b22 /packages
parent287830d6e01a919bcb4ac4ccec4173cdbdcf9470 (diff)
downloaddexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.gz
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.bz2
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.lz
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.xz
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.tar.zst
dexon-sol-tools-ec2e726be0a653465d3c83e640aa4c1556a0f10f.zip
Rephrased some of the math in MixinMatchOrders to improve readability
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol
index 8f289ee85..226a1bfb6 100644
--- a/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol
+++ b/packages/contracts/src/2.0.0/protocol/Exchange/MixinMatchOrders.sol
@@ -184,12 +184,12 @@ contract MixinMatchOrders is
// Case 1: Right order is fully filled
matchedFillResults.right.makerAssetFilledAmount = rightMakerAssetAmountRemaining;
matchedFillResults.right.takerAssetFilledAmount = rightTakerAssetAmountRemaining;
+ matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount;
matchedFillResults.left.makerAssetFilledAmount = getPartialAmountFloor(
leftOrder.makerAssetAmount,
leftOrder.takerAssetAmount,
- matchedFillResults.right.makerAssetFilledAmount
+ matchedFillResults.left.takerAssetFilledAmount
);
- matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount;
} else {
// Case 2: Left order is fully filled
matchedFillResults.left.makerAssetFilledAmount = leftMakerAssetAmountRemaining;
@@ -198,7 +198,7 @@ contract MixinMatchOrders is
matchedFillResults.right.takerAssetFilledAmount = getPartialAmountCeil(
rightOrder.takerAssetAmount,
rightOrder.makerAssetAmount,
- matchedFillResults.left.takerAssetFilledAmount
+ matchedFillResults.right.makerAssetFilledAmount
);
}