Disallow self filling

This commit is contained in:
Remco Bloemen 2018-08-24 10:49:05 -07:00
parent 749c6ecc30
commit 3e4493b389

View File

@ -314,7 +314,13 @@ contract MixinExchangeCore is
"INVALID_TAKER"
);
}
// Orders can not be self-filled (use cancel instead)
require(
order.makerAddress != takerAddress,
"INVALID_TAKER"
);
// Validate Maker signature (check only if first time seen)
if (orderInfo.orderTakerAssetFilledAmount == 0) {
require(