Skip to content

Instantly share code, notes, and snippets.

@Fi3
Last active May 30, 2017 15:00
Show Gist options
  • Save Fi3/8d33d87c8e33604de271852f83e1ebef to your computer and use it in GitHub Desktop.
Save Fi3/8d33d87c8e33604de271852f83e1ebef to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### First we find H (haspower per block)\n",
"\n",
"$$ PROFIT = REWARD - COST$$\n",
"\n",
"$$ PROFIT = i \\times COST$$\n",
"\n",
"$$ REWARD = \\frac{R}{N}$$\n",
"\n",
"$$ COST = \\frac{R}{N(1+i)}$$\n",
"\n",
"$$ COST = H \\times c_e\\times e_{asic}$$\n",
"\n",
"$$ H\\times c_e\\times e_asic = \\frac{R}{N(1+i)}$$\n",
"\n",
"$$ H = \\frac{R}{N(1+i)(c_e\\times e_{asic})}$$\n",
"\n",
“finish \n”,
"### Then we find the efficiency\n",
"\n",
"$$ e_{pow} = \\frac{attackCost}{rewardPerBlock} = \\frac{0.5 \\times H \\times c_{asic} + H \\times c_e \\times e_asic}{\\frac{R}{N}}$$\n",
"\n",
"$$ e_{pow} = \\frac{H(1.01 \\times c_{asic} + c_e \\times e_{asic}}{\\frac{R}{N}}$$\n",
"\n",
"$$ e_{pow} = \\frac{\\frac{R}{N(1+i)(c_e\\times e_{asic}}(1.01\\times c_{asic} + c_e \\times e_{asic})}{\\frac{R}{N}}$$\n",
"\n",
"$$ e_{pow} = \\frac{1.01\\times c_{asic} + c_e \\times e_{asic}}{(1+i)(c_e\\times e_{asic}}$$\n",
"\n",
"$$ e_{pow} = \\frac{1}{1+i}(1+1.01\\frac{c_{asic}}{c_e\\times e_{asic}}$$"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment