-
Notifications
You must be signed in to change notification settings - Fork 10
handle dust / rounding on exchange order match #21
Copy link
Copy link
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Multiple related issues:
- no point to leave small amounts in order book on either side
- placing & matching 100A€ sell and 100A€ worth of ETH buy orders leaves 0.0001 A€ on buy side. See test case in
exchange_fiddlingbranch - likely related, rounding issue on small amount: 0 orderfill on rinkeby with an earlier version
Proposed solution:
a) Use roundedDiv for both sellWei and tradedTokens calculation in _fillOrder. It's a solution for issue 2.
b) On fill increase the fill buy or sell amount if the leftover is smaller than a parameter. It would resolve all the above issues. Need to think over if there is any potential abuse of this rule.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested