Eth is compared in the first part of the equation, but market maker's amount give is not explicitly checked to be more than the calculated token qty deducted.
Either prove that it must be more than qty deducted or add code to handle that case (i.e. double closeout).
This is all caused by rounding errors.
Eth is compared in the first part of the equation, but market maker's amount give is not explicitly checked to be more than the calculated token qty deducted. Either prove that it must be more than qty deducted or add code to handle that case (i.e. double closeout). This is all caused by rounding errors.