0

I want to issue the stellar equivalent of ethereum. Ethereum requires at least 18 units of precision but the amount on stellar is capped at int64 max. This isnt restricted to Ethereum so my question is how to issue an asset of an arbitary precision?

1

To my knowledge you can't do this. Asset amounts are scaled down to seven decimal places for human readability.

The smallest non-zero amount unit is 0.0000001 (one ten-millionth) represented as an integer value of one. The largest amount unit possible is ((2^63)-1)/(10^7) (derived from max int64 scaled down) which is 922,337,203,685.4775807.

Source: https://www.stellar.org/developers/guides/concepts/assets.html

Ethereum chooses to handle precision differently.

  • so if i deposit some ethereum at this anchor, the amount of asset-issued ethereum will have a loss of precision. If i choose to withdraw this ethereum, how would an anchor handle this? Make the customer add a memo field to include to the amount specified + the remaining amount that isn't specifiable due to loss of precision? – drdgvhbh Jul 23 at 23:20
  • Or keep track of the exact amount via an account on the website. There’s probably a couple of ways. But losing an amount beyond 7 decimal places would likely be significantly less than a penny in dollar value. – kolten Jul 24 at 3:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.