tokamak-network / tokyo

tokyo monorepo
Apache License 2.0
4 stars 5 forks source link

From `accept buying tokens over stage max purchase` testing #9

Closed shingonu closed 6 years ago

shingonu commented 6 years ago

I have two questions.

  1. The rate value is 260. I think tokenAmount is should be divided by .div(coeff), not just multiplication(260). https://github.com/Onther-Tech/tokyo/blob/4c8ad10f59b1612e1c4dc1900e58460161e88f92/packages/tokyo-reusable-crowdsale/audit/full-features/test/FullFeatures.js#L184
  2. I wonder how investAmount(wei) can be used beyond stage's max_purchase_limit value. https://github.com/Onther-Tech/tokyo/blob/4c8ad10f59b1612e1c4dc1900e58460161e88f92/packages/tokyo-reusable-crowdsale/audit/full-features/test/FullFeatures.js#L189
4000D commented 6 years ago
  1. that rate is token rate that is equal to 1 / token_price, not related with coeff
  2. Even though investor funded ether over stage's max limit, the ether amount is reduced up to the stage's max limit in calculateToFund function of StagedCrowdsale
shingonu commented 6 years ago

If the base_rate is 200, the coeff value is 1000, and is_static is true, can I purchase 20 token at a price of 100 wei?

4000D commented 6 years ago

1 ether = 200 token = 200e18 unit token 1 wei = 200 unit token

token price = 1 ether / 200 token = 0.005