Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle dust / rounding on exchange order match #21

Open
szerintedmi opened this issue Feb 18, 2018 · 1 comment
Open

handle dust / rounding on exchange order match #21

szerintedmi opened this issue Feb 18, 2018 · 1 comment
Labels
question Further information is requested

Comments

@szerintedmi
Copy link
Member

szerintedmi commented Feb 18, 2018

Multiple related issues:

  1. no point to leave small amounts in order book on either side
  2. placing & matching 100A€ sell and 100A€ worth of ETH buy orders leaves 0.0001 A€ on buy side. See test case in exchange_fiddling branch
  3. 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.

@szerintedmi szerintedmi added the question Further information is requested label Feb 18, 2018
@szerintedmi
Copy link
Member Author

consensus with @phraktle so far:

a) we will user roundedDiv so issue about point 2. should be resolved
b) we leave the issue of minimum amounts in backlog for the limited pilot. We will run some performance tests with 1000+ orders and check how the UI can handle. Depending on results and on how big issue is it during the limited pilot we have multiple ways to tackle it, eg: we can hide small amounts on UI, or easily release a new Exchange contract.

@krosza ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant