Bitcoin Forum
May 07, 2024, 01:04:15 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
1715087055
Hero Member
*
Offline Offline

Posts: 1715087055

View Profile Personal Message (Offline)

Ignore
1715087055
Reply with quote  #2

1715087055
Report to moderator
1715087055
Hero Member
*
Offline Offline

Posts: 1715087055

View Profile Personal Message (Offline)

Ignore
1715087055
Reply with quote  #2

1715087055
Report to moderator
1715087055
Hero Member
*
Offline Offline

Posts: 1715087055

View Profile Personal Message (Offline)

Ignore
1715087055
Reply with quote  #2

1715087055
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715087055
Hero Member
*
Offline Offline

Posts: 1715087055

View Profile Personal Message (Offline)

Ignore
1715087055
Reply with quote  #2

1715087055
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!