Last active
September 11, 2017 17:31
-
-
Save stefanobernardi/d6eda1fb299d0832c3dad71a5a4fcd20 to your computer and use it in GitHub Desktop.
Revisions
-
stefanobernardi revised this gist
Aug 4, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,10 @@ 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 total_filecoin_sold = total_filecoin_sold + coins # let's add the new coins to the total -
stefanobernardi revised this gist
Aug 4, 2017 . 1 changed file with 8 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,16 @@ 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 = 10000.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.85 # 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 total_filecoin_sold = total_filecoin_sold + coins # let's add the new coins to the total # puts "Bought " + coins.to_s + " Filecoins at " + price.to_s + ". Total raised = $ " + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse + ", and total coins = " + total_filecoin_sold.to_s end puts "Final price is $" + price.to_s puts "Raised $" + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse puts "Total filecoins sold: " + total_filecoin_sold.to_s -
stefanobernardi revised this gist
Aug 3, 2017 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,11 @@ total_filecoin_sold = 69000000.00 # the number of Filecoins already sold in the presale assuming no vesting discounts 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 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 total_filecoin_sold = total_filecoin_sold + coins # let's add the new coins to the total # puts "Bought " + coins.to_s + " Filecoins at " + price.to_s + ". Total raised = $ " + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse + ", and total coins = " + total_filecoin_sold.to_s end puts "Raised $" + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse puts "Total filecoin control: " + total_filecoin_sold.to_s -
stefanobernardi created this gist
Aug 3, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ 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 = 69000000.00 # the number of Filecoins already sold in the presale assuming no vesting discounts 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 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 total_filecoin_sold = total_filecoin_sold + coins # let's add the new coins to the total # puts "Bought " + coins.to_s + " Filecoins at " + price.to_s + ". Total raised = $ " + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse + ", and total coins = " + total_filecoin_sold.to_s end puts "Raised $" + amount_raised.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse puts "Total filecoin control: " + total_filecoin_sold.to_s