# Introduction

You’ve probably heard over and over that Bitcoin has a 21 million supply cap. But where does that number come from? As is always the case with blockchain and cryptocurrencies it’s important to understand how they work so when you decide to go all in, you can be confident that you at least understand something about where you put your money, so you can hold on for dear life as your savings dwindle to nothing before the return of the bull market (it’s going to be a cold winter).

So as we all know, bitcoin has a halving cycle that has happened approximately every four years, since its inception in 2009. The original block reward being 50 bitcoin, which was cut in half every 210,000 blocks produced. We call this the four year cycle because at 10 blocks per minute, 6 blocks are added every hour, 144 every day, and 52,560 every year. And 210,000 divided by 52,560 is 3.99 or about 4 years.

But that’s not what I want to focus on here. I want to demonstrate how using some simple mathematical techniques we can calculate the sum total of all bitcoin produced, just knowing the halving cycle and the payout from the first block. We are going to do what is called finding the limit of an infinite series.

# Adding the Infinite with Zeno

The most common way people are introduced to infinite series is some form of Zeno’s paradox, which I’m going to butcher here so that I don’t have to look up exactly what he said. Zeno claimed that it was impossible to walk between two points. He insisted that to do this you must first walk half the distance between the points, and then half again, and then half again, and so on. And at no point would you ever reach the end because you always had a little bit more to go. It may be easier to see this in this image I stole from google:

Figure 1: NFT I Stole From Some Poor Soul.jpg

So to see how far we have traveled we have to add up the segments we have walked thus far, and we hope to god that this equals 1 or we may never reach the end of this hell. I added a little question mark above the equals sign, and some dots because we are really adding up an infinite list of numbers, and we don’t actually have a way to figure out what this is equal to yet.

Figure 2: My own handmade NFT this time.jpg

And it was thousands of years before anyone could figure out how to actually find the answer to this problem. Newton, the famous inventor of calculus came along and just assumed that infinite sequences and series like this *just worked* and used them to build calculus. But it wasn’t until a mathematician by the name of Augustin-Louis Cauchy (that’s coshie not couchie) showed up in the early 19th century that we found a way to answer to this question. And yes, I promise I’ll get back to the bitcoin supply cap.

So Cauchy came along and said that under specific circumstances there will be a number that this sequence is equal to. Here I’ll call it **L**. And this only happens when the numbers we are adding together get smaller and smaller as we go along in the sequence (like in Zeno’s paradox), until what we are adding is so small that it doesn’t change the final answer. Basically, we have pretty much walked to the end and can just step over the finish line.

So to put this in more mathematical terms, a **sequence** will **converge** to a **limit**, **L**, if and only if we go far enough in the sequence for the following to be true:

Figure 3: Sell this as an NFT I dare you

All this is saying is that if we go a number, **n** out in the sequence, then when you subtract the one after (**n+1**), you get some really really small number that is always less than another really tiny number that is represented by the Greek symbol epsilon (thanks Zeno!) So if this is the case for our series (which it is), then we can find the limit, L, to our series and find out exactly how far we’ve gone. Also, those little bars (called the absolute value) mean that if the answer is negative, just make it positive. For example, if we set n equal to 6 we would get:

So our little epsilon is 0.01562, a *very* small number and we are starting to feel like this series might converge after all. I won’t bore you with every little detail but to show this we first must write our series in a way that shows what exactly is happening with each step. To see how we do this notice that each value in the denominator of our fractions is a power of 2.

Figure 5: Uh-oh things are starting to get complicated

Now we can write this more compactly with a Greek symbol called sigma, which is just telling us to sum (add together), and we can use the letter n like we did before, to represent the power that 2 is raised to:

Figure 6: Even more complicated but stick with me, we’re almost there!

And while this looks pretty confusing, it’s actually very simple. For example if we set n equal to 5, and write this out, it looks like this:

And look! We have only added 5 terms in the sequence and we’re getting close to 1. So what we have here is called a **geometric series,** which is one very well understood type of infinite series, that goes to 1 (L=1) as the number of terms goes to infinity.

# The Bitcoin Supply Cap (or why bitcoin is backed by math)

Now we want to do this same thing but with the bitcoin supply. We know that every 210,000 blocks the number of bitcoin produced per block gets cut in half, starting with 50 bitcoin. This looks something like:

Where the … represents the other 209,996 times that each number appeared before the getting cut in half at the halvening. But because we know how many times each number appears we can write this as:

Because adding 50, 210,000 times is 50 times 210,000. And look at the sequence of numbers in the parenthesis on the right hand side. They are cutting in half each time. So with a little more algebra we can work some magic to get

Figure 10: Seriously, how is it?

And look at this. We have Zeno’s sequence appearing before our very eyes! Now we can rewrite this once more in a more compact form and hopefully for the last time as:

Now we are almost there. We just have to resolve one issue that the savy among you may have already noticed. This series starts at 0 instead of 1 like Zeno’s. Fixing this is actually really easy. We just write out the first term in the sequence to remove it from the sum like this:

Figure 12: I realize now that the comma was distracting

Notice how we just took the first term out where n is zero, and then just wrote the rest but started it at 1. Now noting that 2 raised to 0 is 1, the first term is just 210000*50. And because we recognize that the series is Zeno’s series, we know that it is equal to 1. So we can multiply and add all this up to get our supply cap:

And that’s how we get 21,000,000 bitcoin. We could actually do the same procedure to figure out how many years it would take to reach this number, but I wont do that here as this post is long enough.

So if you’ve made it this far thanks for reading! I honestly have no idea how easy this is to follow because I don’t know how much math the average cryptocurrency subreddit user knows. But if you’ve ever wondered why people like Michael Saylor say bitcoin is backed by math, this is it.

TLDR: The supply cap of Bitcoin is 21,000,000 bitcoin.

submitted by /u/Blue_Cheer

[link] [comments]