Closed kongliangzhong closed 6 years ago
By swap rings position from [[0, 1], [0, 2]] to [[0, 2], [0, 1]], it works as expected. so maybe we can rely on relay on this.
I think it is a right result, it should fail. And if we want to success, the position of the two rings should be swapped. Maybe it is better to optimize by relay.
please check test/testExchangeAudit.ts for details.
It only failed in the simulator, the smart contracts partially filled order 0 (which of course should not be possible). Should be fixed in 3db2c64ffad1f95d2df07b933f9d6d70508dc87b.
But I agree, the relay should send the rings in the best order to maximize profits.
Ok, issue closed.
Consider the following test case:
Expected fill amounts of Order 0, 1, 2 should be (10, 10), (4, 4) and (6,6) Actual result: failed