Rate for Crowdsale

Just to confirm that I got it right. If I wanna sell my token (18 decimals, same as ETH) at 0.5 ETH, then my rate will be 2. I got it right, right?

1 Like

Looks like a related question to this one: Changing rate/price of a token in Crowdsale if you set the rate is 2, then you can use 0.5eth to buy one token.

buyAmount = msg.value * rate
1 Like

Hi @PradhumnaPancholi,

Yes. Check the calculation with the documentation: https://docs.openzeppelin.com/contracts/2.x/crowdsales#crowdsale-rate

I recommend adding unit tests to check this.