Bitcoin Forum
May 12, 2024, 02:58:45 PM *
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 178 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
1715525925
Hero Member
*
Offline Offline

Posts: 1715525925

View Profile Personal Message (Offline)

Ignore
1715525925
Reply with quote  #2

1715525925
Report to moderator
1715525925
Hero Member
*
Offline Offline

Posts: 1715525925

View Profile Personal Message (Offline)

Ignore
1715525925
Reply with quote  #2

1715525925
Report to moderator
The forum strives to allow free discussion of any ideas. All policies are built around this principle. This doesn't mean you can post garbage, though: posts should actually contain ideas, and these ideas should be argued reasonably.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715525925
Hero Member
*
Offline Offline

Posts: 1715525925

View Profile Personal Message (Offline)

Ignore
1715525925
Reply with quote  #2

1715525925
Report to moderator
1715525925
Hero Member
*
Offline Offline

Posts: 1715525925

View Profile Personal Message (Offline)

Ignore
1715525925
Reply with quote  #2

1715525925
Report to moderator
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!