Use fixed point math in Issuance.sol
uivlis opened this issue · comments
Vlad Silviu Farcas commented
There is an issue with the current formula for token issuance, which is
amount(issuanceToken) = amount(currencyToken)/issuePrice
because you cannot set a subunitary issuePrice. It should be:
amount(issuanceToken) = amount(currencyToken).fixedDiv(issuePrice, 10**18)
or something similar using fixed point math. See ABDK or Fixidity.