-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TRD-783] Implement CalcAmountIn for kyber limit order (#657)
* Implement CalcAmountIn without tests * Update test cases * Move some logic of CalcAmountIn into its own file * Add test case same as CalcAmountOut * Get rid of constant.ZeroBI * Get rid of big.Float when calculate amount * Reduce math Add or Sub operations * Update formulor calculate making amout before fee * Add threshold temp variable * Fix datarace * Return a copy of big.Int * Update divCeil * Correct formular to calculate filledMakingAmountWei * Add test for CalcAmountOut then CalcAmountIn * Reduce the length of new tests Reduce the length of tests 2 Reduce the length of tests 3
- Loading branch information
Showing
7 changed files
with
758 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.