Bitcoin Forum
May 28, 2024, 11:51:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Testing my little math skills on Bitcoin halving formula  (Read 59 times)
Felicity_Tide (OP)
Jr. Member
*
Online Online

Activity: 42
Merit: 13


View Profile
Today at 05:26:18 AM
Merited by vapourminer (4)
 #1

I came across hugeblack's reply https://bitcointalk.org/index.php?topic=5497911.msg64132796#msg64132796 on a thread yesterday, where he used a photo of Bitcoin halving formula as an illustration based on the question that was asked. I instantly got attracted to the formula, and was eager to perform the mathematical calculation of Bitcoin halving approximately every four years. It also turns out that this formula can also give the total supply value.

The image you see below is not different from what hugeblack shared in his reply yesterday. I will explain the key points in the formula below before moving further.

  • The value 2 represent the decreasing factor for every halving.
  • The value 10^8 represents the smallest unit of Bitcoin also known as Satoshi. E.g 0.0000012.
  • 210K is simply the number of blocks that needs to be mined before halving is triggered
  • 50 is the first amount of reward
  • the letter i below the sigma sign represents each halving. It must start with a value of 0 to 32, making the total halving to occur 33 times.

My aim was to get the total number of Bitcoin supply, but Inorder to achieve that, I will have to perform the calculation 33 times before arriving at my answer. For example, first trial will require me to replace i with 1, which will result to a value of 10500000 Bitcoin been mined for first halving year. Second trial, replacing i with 2, will result to 5249999.998 Bitcoin been mined for second halving year. I can continue to do this till my last trial which is by replacing i with 32, which will give 2.444721758×10^-3.

Trying to calculate all 33 values one after the other was so stressful and unhealthy, though I tried it. I had a thought to use other methods in carrying out the calculation, and my calculator came to mind. The images below are two different calculators that i used, which gave me an estimated value. I was able to compute the sigma sign, and also use x in place of i because my calculator does not have i.

https://www.talkimg.com/images/2024/05/27/LIwpP.jpeg


https://www.talkimg.com/images/2024/05/27/LIS3j.jpeg


I then challenged myself to perform the calculation on a paper, rather than inputting all values into the calculator to get a straight answer. The image below show my three steps.
  • Step 1 was just to evaluate by multiplying the number of blocks by the number of first reward, and then dividing both units of Bitcoin (10^8).
  • Step 2, I had to get rid of the sigma sign Since I already know that it is use to sum multiple terms. Sum of a geometric progression was used to replace the sigma sign, with a formula containing it's first term, common ratio and nth term.
  • Step 3, I finalized by getting my answer.


The image below is not that different from the one above. I had to draft this when I noticed that another solution can come from the one above. If you observe the image below, you noticed that I break down the Sum of a GP formula into two, which one part happens to be the formula for Sum to Infinity. If you compute your first term and common ratio, you will still get same 21M value as the one above, but I think this can only happen when 32 at the top of the sigma sign is changed to infinity . Unluckily for me, my calculator does not have an infinity sign, which makes it difficult to confirm.




I need to also share this. The 21M total supply is actually a calculator estimated value, and don't really follow the principles that governs the real formula itself. But that does not mean that the calculator is totally wrong. I discovered this when I decided to stress myself out, by calculating the entire halving values 33 times just by increasing my count by a factor of 1.


The image above was my rough work for each values of every halving. After taking my time to perform this calculation, I discovered that the total value does not amount to 21M, but rather 20999999.92. Each values represents the total amounts that can be mined for a particular mining period before another halving occurs.

Please note that after you've used the halving formula to get the first number of Bitcoins to be mined (10500000), any attempt to start dividing by a factor of 2 without using the proper formula, will give you a wrong value. You can try this by dividing 10500000/2, and also try it for others.

My Question:
1. What do you think about the part where I applied sum to infinity ?.

My calculations on this post are for fun purposes, but might be educational to someone. I am not certain 100% accurate, but I think racking my brain all day for Bitcoin math is quite interesting to me.
un_rank
Hero Member
*****
Offline Offline

Activity: 728
Merit: 695


- Jay -


View Profile WWW
Today at 08:01:15 AM
 #2

The image you see below is not different from what hugeblack shared in his reply yesterday
...
Yes, it is slightly different from the one hugeblack shared:

In the end you arrive at the same result cause the 108 variable which appears twice cancels itself out. But using the first formula you can easily solve for the total supply. You also do not have to replace i with 1,2,3 and on, solving for each halving period, that invalidates the formula. Using it exactly as it is will give results for the entire 32 halvings we would have.

- Jay -

██████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
██████████████████████
.SHUFFLE.COM..███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
█████████████████████
████████████████████
██████████████████████
████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
██████████████████████
██████████████████████
██████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
███████████████████████
.
...Next Generation Crypto Casino...
hosseinimr93
Legendary
*
Online Online

Activity: 2408
Merit: 5263



View Profile
Today at 09:40:11 AM
Merited by vapourminer (2)
 #3

After taking my time to perform this calculation, I discovered that the total value does not amount to 21M, but rather 20999999.92.
You did the calculations wrongly. For example, 5,250,000 BTC were generated in the second period. I don't know how you got the 5249999.998 BTC.
The total number of bitcoins will be finally 20999999.9769

My Question:
1. What do you think about the part where I applied sum to infinity ?.
With doing do, the result would be 21,000,000 and that's not accurate. That's because we can't have more than 8 decimal places for each bitcoin.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Felicity_Tide (OP)
Jr. Member
*
Online Online

Activity: 42
Merit: 13


View Profile
Today at 10:59:12 AM
 #4

After taking my time to perform this calculation, I discovered that the total value does not amount to 21M, but rather 20999999.92.
You did the calculations wrongly. For example, 5,250,000 BTC were generated in the second period. I don't know how you got the 5249999.998 BTC.
The total number of bitcoins will be finally 20999999.9769



My Question:
1. What do you think about the part where I applied sum to infinity ?.
With doing do, the result would be 21,000,000 and that's not accurate. That's because we can't have more than 8 decimal places for each bitcoin.

21,000,000 is an integer and does not contain any decimal place. Like I said earlier, 21K is an estimated value.
hosseinimr93
Legendary
*
Online Online

Activity: 2408
Merit: 5263



View Profile
Today at 11:27:20 AM
Last edit: Today at 11:41:20 AM by hosseinimr93
Merited by vapourminer (2)
 #5


I was referring to your paper where x=2 and I thought you meant the second period by x=2.
I don't understand what's the use of calculating the sum from x=2 to x=32.

21,000,000 is an integer and does not contain any decimal place. Like I said earlier, 21K is an estimated value.
Yes, 21,000,000 doesn't have any decimal point and I know that.
I was referring to the block rewards. For example, after the 10th halving, 0.048828125 BTC should be generated in each block and that will be rounded down to 0.04882812 BTC.

Visit this for accurate numbers:
https://en.bitcoin.it/wiki/Controlled_supply

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Felicity_Tide (OP)
Jr. Member
*
Online Online

Activity: 42
Merit: 13


View Profile
Today at 11:46:58 AM
 #6


I don't understand what's the use of calculating the sum from x=2 to x=32.

I was a little bit crazy about it Grin. I actually stated it that "it's unhealthy to take such a long step", but i actually enjoyed it  Grin.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!