Bitcoin Forum
June 04, 2024, 06:07:28 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Solidity math is confusing. Can you help?  (Read 179 times)
MoneyBomber (OP)
Jr. Member
*
Offline Offline

Activity: 105
Merit: 6


View Profile
February 07, 2018, 04:19:18 AM
 #1

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
etherflip
Copper Member
Jr. Member
*
Offline Offline

Activity: 103
Merit: 7


View Profile
February 07, 2018, 05:30:12 AM
Merited by paxmao (1)
 #2

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.
MoneyBomber (OP)
Jr. Member
*
Offline Offline

Activity: 105
Merit: 6


View Profile
March 14, 2018, 08:17:21 PM
 #3

I got it now.
I was looking for something that wasn't there.

solidity works like key state frame changes
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!