This PR fixes the erroneous basisPoints calculation formula when handling the fulfilment of a partially filled orders using fulfillOrders(). This caused the transaction to revert with an overflow error. As an extension to this fix, the tips scaling logic has also been updated to handle the scenario where unitsToFill is undefined.
Motivation
Fixes #578
Solution
This PR fixes the erroneous
basisPoints
calculation formula when handling the fulfilment of a partially filled orders usingfulfillOrders()
. This caused the transaction to revert with an overflow error. As an extension to this fix, the tips scaling logic has also been updated to handle the scenario whereunitsToFill
is undefined.