Simple block halving countdown website
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 4.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <meta name="author" content="Trey Del Bonis"/>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  7. <title>Bitcoin Halving Countdown</title>
  8. <script src="main.js"></script>
  9. <link rel="stylesheet" type="text/css" href="style.css"/>
  10. </head>
  11. <body onload="init();">
  12. <div id="content">
  13. <div id="heading">
  14. <h1>Bitcoin Block Halving Countdown!</h1>
  15. <h3><span id="blocksleft">...</span> blocks left</h3>
  16. <h3><span id="timeleft">... remaining</span></h3>
  17. <h3 id="halftimectr"><span id="halftime">ETA ...</span></h3>
  18. <p>
  19. Click/tap on the rows for more statistics - <a href="#faq">FAQ</a>
  20. </p>
  21. </div>
  22. <div id="blocklist">
  23. <span id="blocklistloading">Loading blocks...</span>
  24. </div>
  25. </div>
  26. <hr/>
  27. <div id="faq">
  28. <h2 style="text-align: center;">Halving FAQ</h2>
  29. <p>
  30. <b>Q:</b> What's a halving? Does that mean I'll have twice/half as many coins?
  31. </p>
  32. <p>
  33. <b>A:</b> No, a reward halving is when the fixed subsidy for miners gets
  34. cut in half. This has happened twice before, and will happen many more
  35. times until all bitcoins have been mined (21 million).
  36. </p>
  37. <p>
  38. <b>Q:</b> Who decides when halvings happen? Can this be stopped?
  39. </p>
  40. <p>
  41. <b>A:</b> Satoshi embedded the halving algorithm into the consensus protocol of
  42. the Bitcoin network. It can only be changed if every user of the
  43. network decided to change it as part of a hard fork. One of Bitcoin's
  44. core offerings is its fixed and unchangable monetary policy, so it's
  45. <em>exceedingly unlikely</em> that it is going to be changed.
  46. <br/><br/>
  47. The reward function (in Bitcoins) is
  48. <code>r(h) = 50 / (2 ** floor(h / 210000))</code>, where h is block height.
  49. </p>
  50. <p>
  51. <b>Q:</b> I noticed some of your measurments here are different than those on
  52. other countdown clocks. Why is that?
  53. </p>
  54. <p>
  55. <b>A:</b> Since mining is a probabilistic process, it's impossible to predict
  56. when new blocks will be mined. <em>On average</em>, new blocks are
  57. mined every 10 minutes, but this can vary a lot. So it's hard to
  58. predict <em>exactly</em> when block number 630000 will be mined, but all
  59. answers will converge when the time comes. Since everyone does the math
  60. slightly differently we all get slightly different answers.
  61. </p>
  62. <p>
  63. <b>Update:</b> I've been noticing the hashrate seems to be a lot higher
  64. than usual. I wrote a modified block halving ETA algorithm that bases
  65. block times on the average of the recent blocks, but I won't display it
  66. directly as might give too misleading predictions, or my code might be
  67. wrong. You can check its answer below:
  68. <br/>
  69. <button onclick="updateFancyPrediction();">Check adjusted ETA</button>
  70. <i><span id="fancyprediction"></span></i>
  71. </p>
  72. <p>
  73. <b>Q:</b> Can I use this event to make money?
  74. </p>
  75. <p>
  76. <b>A:</b> Probably not. But it's been observed that crypto bull markets have
  77. happened in the (roughly) year after each of the previous two halvings,
  78. so take that how you will.
  79. </p>
  80. <p>
  81. <b>Q:</b> Bull markets? Does that mean I should buy Bitcoin?
  82. </p>
  83. <p>
  84. <b>A:</b> That's up to you. I'm not your financial advisor. Don't invest what
  85. you can't afford to lose.
  86. <!-- But also, buy Bitcoin! -->
  87. </p>
  88. <p>
  89. <b>Q:</b> I have another question for you
  90. </p>
  91. <p>
  92. <b>A:</b> I can be contacted at the following addresses...
  93. <ul>
  94. <li>Matrix: @trey:foobar.style</li>
  95. <li>IRC on Freenode: treyzania</li>
  96. <li>Briar: <a href="briar://ac22od43vo66zsclxawfcd63ltweyfbfbqgk2w67vswpxshuwckr6">briar://ac22od43vo66zsclxawfcd63ltweyfbfbqgk2w67vswpxshuwckr6</a></li>
  97. </ul>
  98. </div>
  99. <hr/>
  100. <div id="footer">
  101. Made by <a href="https://tr3y.io">Trey</a> - <a href="https://code.tr3y.io/treyzania/minihalf">Source</a>
  102. <div id="donations">
  103. <p>BTC bc1qj4tw5zuw3cl2wy5jw0lt4jghksrex8dnndp3vn</p>
  104. <p>BTC legacy 3MgDA5Ukc6waaaK6BVndLdQBtKnYhZHuTK</p>
  105. <p>DOGE DBDgYidXBpSCkFhhAZV8Lfp4NuMDD4SNxk</p>
  106. <p>ETH 0x08CA026673F0dD458fef8d7f9Df72Ad105558eA3</p>
  107. </div>
  108. </div>
  109. </body>
  110. </html>
  111. <!--
  112. The student asked his master, "Is this good for Bitcoin?".
  113. The master, looking up from his tea towards the rising sun, said,
  114. "Yes, this is good for Bitcoin."
  115. And it was good.
  116. -->