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

[0.5] Non divisible asset vs Non divisible asset in the DEX allows fractional pricing in orderbook #186

Closed
steempower opened this issue Jul 7, 2017 · 4 comments
Assignees
Labels
question [3] Bug Classification indicating the existing implementation does not match the intention of the design
Milestone

Comments

@steempower
Copy link

Whaleshare and Beyondbit are non divisible assets. On the DEX for example Whaleshare:Beyondbit the GUI is allowing decimal pricing despite BOTH assets being non divisible.

In the GUI orderbook it display's as a whole number followed by a decimal place but no decimals. For example a price of .76 or 1.26 displays on the GUI DEX as '1.' if a user was to click on that order in the orderbook then the actual price of 1.26 is populated into the price field but when you proceed with the buy order it is rounded up to the next integer e.g 2.

Example: I tried to buy 1 beyondbit for 1.26315789 Whaleshare which resulted in the price being rounded up and me paying 2 whaleshares and only receiving 1 beyondbit. Blockchain shows price of 2 whaleshare/beyondbit for both the place order and the fill order operation.

http://i.imgur.com/xawP0HM.png

I was thinking this was a blockchain issue as the prices underlying the display bug in the order book are fractional but it seems (as mentioned above) if i place a fractional order in the GUI then look at the TX in the chain it shows a round number not the fractional price that was entered in the GUI.

@wmbutler
Copy link
Contributor

Seems like the front-end should do the rounding as the user enters the value based upon the known precision of the currency.

@wmbutler wmbutler added the [3] Bug Classification indicating the existing implementation does not match the intention of the design label Jul 23, 2017
@wmbutler wmbutler modified the milestone: 170914 Aug 15, 2017
@svk31 svk31 self-assigned this Aug 31, 2017
@wmbutler
Copy link
Contributor

@svk31 @xeroc This warrants some discussion so the GUI is intuitive and guides the user appropriately.

@wmbutler wmbutler changed the title Non divisible asset vs Non divisible asset in the DEX allows fractional pricing in orderbook [3] Non divisible asset vs Non divisible asset in the DEX allows fractional pricing in orderbook Sep 1, 2017
@svk31
Copy link
Contributor

svk31 commented Sep 5, 2017

Similar to #314 , although non-divisible assets have some additional issues with respect to rounding in the orderbooks that I can look into.

It is obviously not possible to buy 1 beyondbit for 1.26315789 Whaleshare, since Whaleshare is a non-divisible asset, however that price is valid for the quantities defined in the existing order that you clicked on. To perform a partial match you then have to offer the next possible better price, which in your case was 2 whaleshare for 1 beyondbit, that is correct and how it should work.

In general trading with non-divisible assets is a bad idea and will result in very confusing pricing.

@svk31
Copy link
Contributor

svk31 commented Sep 5, 2017

image

@svk31 svk31 changed the title [3] Non divisible asset vs Non divisible asset in the DEX allows fractional pricing in orderbook [0.5] Non divisible asset vs Non divisible asset in the DEX allows fractional pricing in orderbook Sep 5, 2017
@svk31 svk31 closed this as completed Sep 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question [3] Bug Classification indicating the existing implementation does not match the intention of the design
Projects
None yet
Development

No branches or pull requests

3 participants