├── BitcoinEnergyEfficiencyCalculation.txt └── README.md /BitcoinEnergyEfficiencyCalculation.txt: -------------------------------------------------------------------------------- 1 | (* https://en.wikipedia.org/wiki/Electricity_generation# Environmental_concerns 40% of world is coal which is 1000.*) 2 | EnergyEfficiencyDefault := 500 3 | (* https://en.bitcoin.it/wiki/Mining_hardware_comparison Based on some recent asic machines.*) 4 | HashEnergyEfficiencyDefault := 2000 5 | 6 | JoulesIn1kWh:= 3600000 7 | GramsInKilogram := 1000 8 | 9 | (* 25 BTC per 10 minutes. http://tradeblock.com/research/bitcoin-101/how-are-bitcoins-created/*) 10 | BTCPerSecond :=25 /(60 * 10) 11 | 12 | FKgOfCO2PerJoule[EEff_]:= (EEff / GramsInKilogram ) / JoulesIn1kWh 13 | FHashPerSecond[HRate_] := HRate*1000000000 14 | FHashPerBTC[HRate_] := FHashPerSecond[HRate] / BTCPerSecond 15 | FHashPerJoule[HEff_] := HEff * 1000000 16 | FJoulesPerBTC[HEff_, HRate_] := FHashPerBTC[HRate] / FHashPerJoule[HEff] 17 | FKgCO2PerBTC[EEff_,HEff_,HRate_]:= FKgOfCO2PerJoule[EEff] * FJoulesPerBTC[HEff, HRate] 18 | 19 | ChartDataLocation := "/Users/rgill/Downloads/chart-data.csv" 20 | (* Get chart data from http://blockchain.info/charts/hash-rate *) 21 | HistoricalHashRate = Import[ChartDataLocation, "DateStringFormat"-> {"Day", "/", "Month", "/", "Year", " ", "Time"}]; 22 | 23 | HistoricalHashRateWithAbsoluteTime=Table[{AbsoluteTime[HistoricalHashRate[[i,1]]],HistoricalHashRate[[i,2]]},{i,Length[HistoricalHashRate]}]; 24 | 25 | (* We couldn't get an expoential function to fit properly :( . We used this HACK instead.*) 26 | Model:=Fit[HistoricalHashRateWithAbsoluteTime, {1,x, x^2, x^3, x^4, x^5, x^6, x^7},x] 27 | 28 | (* This shows our fitted function of historial hash rates against the real data. 29 | Show[ 30 | ListPlot[newdata], 31 | Plot[Model, {x,3.58 * 10 ^ 9,3.805* 10 ^ 9}, PlotStyle->Red], 32 | PlotRange -> {{3.58 * 10 ^ 9,3.635* 10 ^ 9},{0,100000000}} 33 | ] 34 | *) 35 | 36 | HashRateAtT[year_, month_, day_] := Model /. {x -> {AbsoluteTime[{year,month,day, 0,0,0}]}} 37 | 38 | 39 | Manipulate[ 40 | FKgCO2PerBTC[EnergyEfficiency,HashEnergyEfficiency,HashRateAtT[Year, Month, 1]]"kg of CO2 per BTC", 41 | {EnergyEfficiency,0,1000},{HashEnergyEfficiency,0,5000},{Year,2010,2025, 1},{Month,1,12, 1}, 42 | Initialization:>(EnergyEfficiency:=EnergyEfficiencyDefault;HashEnergyEfficiency:=HashEnergyEfficiencyDefault; Year:=2014; Month := 1)] 43 | 44 | 45 | 46 | Out[528]= Manipulate[FKgCO2PerBTC[EnergyEfficiency, HashEnergyEfficiency, HashRateAtT[Year, Month, 1]]*"kg of CO2 per BTC", {{EnergyEfficiency, 500}, 0, 1000}, 47 | {{HashEnergyEfficiency, 2000}, 0, 5000}, {{Year, 2014}, 2010, 2025, 1}, {{Month, 5}, 1, 12, 1}, 48 | Initialization :> (EnergyEfficiency := EnergyEfficiencyDefault; HashEnergyEfficiency := HashEnergyEfficiencyDefault; Year := 2014; Month := 1)] -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | BitcoinEmissions 2 | ================ 3 | 4 | A project to calculate CO2 emissions of mining bitcoin. 5 | 6 | Motivation 7 | ========== 8 | 9 | We wanted to understand how much energy was going into the computing the hashes in bitcoin and hence how much CO2 was being produced. 10 | 11 | 12 | 13 | Assumptions 14 | =========== 15 | 16 | Generating electricity releases 500 grams of CO2/kWhe. Based on: [wikipedia](https://en.wikipedia.org/wiki/Electricity_generation#Environmental_concerns) 17 | 18 | The average efficiency of the bitcoin miners in the system is 2000 Mhash/J. Which is conservative. Source: [mining hardware comparison](https://en.bitcoin.it/wiki/Mining_hardware_comparison) 19 | 20 | We have generated a function which fits the HashRate up to now - it assumes it's exponental. 21 | 22 | Results 23 | ======= 24 | 25 | According to our calculations as of May 1st 2014 each bitcoin will release ~103 kg of CO2 into the atmosphere. That happens once every 24 seconds. 26 | 27 | If efficiency of bitcoin miners stays the same. That number will reach ~1602 kg of CO2 by May 1st 2015. 28 | 29 | Running the code 30 | ================ 31 | 32 | We've provided the code which is Wolfram Mathematica (version 9). 33 | --------------------------------------------------------------------------------