Bitcoin Forum

Other => Serious discussion => Topic started by: MoneyBomber on February 07, 2018, 04:19:18 AM



Title: Solidity math is confusing. Can you help?
Post by: MoneyBomber on February 07, 2018, 04:19:18 AM
I have a theory about how gambling contracts can create a layer of stable currency. I'm trying to edit a few lines in this contract.

I am trying to understand the lines of code that contains the exponential rate of token price increase.
https://etherscan.io/address/0x2fa0ac498d01632f959d3c18e38f4390b005e200#code


Title: Re: Solidity math is confusing. Can you help?
Post by: etherflip on February 07, 2018, 05:30:12 AM
Which lines specifically? If you are doing complicated math it is advisable to use SafeMath - otherwise you risk overflow and losing funds like the previous ponzi contract that attempted to do what you linked.


Title: Re: Solidity math is confusing. Can you help?
Post by: MoneyBomber on March 14, 2018, 08:17:21 PM
I got it now.
I was looking for something that wasn't there.

solidity works like key state frame changes