-
Notifications
You must be signed in to change notification settings - Fork 12
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
Ether price value and decimal-places of Token #7
Comments
then, MAXNUM value constraint ("use only 128 bits of uint to prevent mul overflows.") |
The base unit is uint 1 and the |
But I think safe division can be performed by restricting token amount and ether price parameter. And I hope decimal places of Token might be fixed to constant(=18) same as Ether. |
There's simply no need to use fixed-point maths when you have no divides. |
If Token issuer make Token with decimal places 18 (many real tokens such as Golem GNT use same decimal places with Ether, 18), ether prices used in trade should be multiple of 1 ether (1,2,3,4 ether, ... but not 0.1 ether for 1.000000000000000000 Token exchange)
So I suggest ether price in contract code should be "ether price per 1 base unit of target Token"
1 base unit of target token = 1*10^(decimals) tokens (1.000000000000000000 token)
The text was updated successfully, but these errors were encountered: