This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| coins = 0.00 # just to initialize. | |
| price = 1.00 # the price Filecoin states is the minimum | |
| amount_raised = 52000000.00 # they've said they already sold $52M in the presale | |
| total_filecoin_sold = 85000000.00 # the number of Filecoins already sold in the presale. This would be $52M/price (price was $0.75 and investors could choose up to 30% discount. I'm using 85M coins as an assumption (min 69M max 99M). | |
| average_investment = 100000.00 # I'm already being generous here | |
| while total_filecoin_sold < (200000000.00 - coins) do # 200M is the max amount of coins | |
| price = amount_raised/40000000.00 # this is their function, it's always more than $1 | |
| price = price * 0.9 # if you want to model an average discount people will choose | |
| coins = average_investment / price # the amount of coins you get with every investment | |
| amount_raised = amount_raised + average_investment # let's add the investment to the total raised |