After almost a week of working in my spare time, I finally found a formula to precisely calculate the amount of bitcoins mined for any given date!

Just a little background here. I’m a high school student, currently studying calculus. I don’t quite understand the concepts of limits or integrals thoroughly, but I was fascinated nonetheless by how the reward system of Bitcoin and its halving worked. When I initially wanted to know how many Bitcoins were mined, I would just use a calculator, and add the previous block halvings, and amounts mined. Afterwards, I realized I can make a rough approximation of this with this formula:

https://preview.redd.it/vst5911td7i41.png?width=356&format=png&auto=webp&s=87ff13e279ad62d5fd775e99dc6373c3b0a5791e

The problem with this function is that it assumes that the mining and reward system were a smooth curve, which isn’t the case. It’s a curve that consists of a bunch of straight lines. So I had to find a formula that reflected this.

My first start would be knowing that the starting block reward was 50 BTC, and that reward would halve every 210,000 blocks or ~4 years. So I started with this formula:

https://preview.redd.it/bni62w74f7i41.png?width=242&format=png&auto=webp&s=591e27a4d790a5b87fc2f043eb778f7545183603

With this formula, I got all of the lines, but they were not in the correct position, so using my knowledge, and logical reasoning, I came up with this formula for determining how many Bitcoins were mined for any given date:

Note: The results won’t be 100% accurate because this model is made on the assumption that each block is exactly 10 minutes

To get your ‘x’ value all you have to do is:

x = (given date – January 3rd, 2009)144*

Then input this value into the formula given above.

Donations will be much appreciated!

For anyone wondering, I’m planning to use this an incorporate it in my mining application (it’s still a work in progress). Thanks for taking the time to read this!

submitted by /u/1MightBeAPenguin
[link] [comments]