Geometric Sums and Series
A geometric sum is what happens when we sum many numbers such that any two consecutive numbers have the same ratio. In other words, we start with some number and some ratio , and then we add and then we add and so on. If we apply the ration for times, we get the sum
When would you possibly encounter such a sum? Well, consider the Bitcoin total supply. Initially, the block reward was , then it was halved to and then to and so on. So it is clear that in this example, but what is . Well, that depends on how many blocks there are between any two halvings. We will get back to this soon.
We note that just multiplies the entire expression, so to understand geometric sums better, it suffices to understand them for where we get the simpler expression:
Is there a way to simplify this thing into an expression without any ellipses in the middle (indicating a sum of unknown length)? Well, there is, but it is a bit tricky. The idea is to start with the expression . Those of you who know about polynomial factorization will recognize that this expression vanishes when substitution and can therefor be divided by , but for those who do not understand anything of what I just said, there is a common trick: we are going to add to a bunch of stuff, but also subtract that exact same stuff, so that we know that we didn't change the value, but the new expression could be rearranged in a way that relates to the geometric sum. It goes like this:
and as long as we assume that , we can divide both sides by and get the famous formula:
So say that we mine a Bitcoin block exactly once every four years. The first block yielded a reward of bitcoin, the second of and so on. Lets say that we mined exactly blocks (that is, we went through halvings). All we need to do is to set and in the formula above, and multiply the result by (to scale for the fact that this was the initial block reward) to get
It is easy to complete the case for , as then we have that for all so the sum just becomes .
If then clearly as we add more and more elements (that is, look at larger values of ), this sum will go to infinity, as each element is larger than the previous. However, if it seems that as increases, vanishes exponentially fast. In fact, this also happens when because, while the powers of change sign, their absolute value still vanishes the same way. A bit of calculus can transform this intuition to a formula for the infinite geometric sum, a.k.a. geometric series:
When will we ever need such a formula? Well, say we want to compute the total supply of Bitcoin. Say that each halving epoch contains blocks, and in the first epoch, each block emitted a reward of . Then we have , so if in every halving the reward is multiplied by we get that the total supply is given by . In Bitcoin, we have , and , substituting into the formula we get the familiar figure
But wait, isn't Bitcoin emission supposed to end at some point? If so, when?
Say that generally we have some such that we set the emission to stop once the reward goes below . Then what we are looking for is the smallest such that , this will tell us how many halvings are expected before the emission stops. If the block delay is , we will get that the length of each halving epoch is so the total time until emission ends is .
Solving the equation is not hard for anyone who knows logarithms. By rearranging a bit we get the equation , and taking the logarithm in base we get the inequality
(We use as the basis of our logarithm rather than because logarithms have confusing pathologies and inversions in a base smaller than ).
Since the we are looking for is the smallest integer satisfying this inequality, we can obtain it by simply rounding up the expression in the left hand side, this is notated like this:
Putting this all together we have shown
Proposition: If a block chain has block delay , and an initial block reward which is reduced by a factor of once every blocks until it goes below , then the time it will take the emission to end is
In Bitcoin we have , , , and . The value is the smallest representable Bitcoin value, a staoshi, that is worth one hundrendth of one millionth of a bitcoin. In other words, qubits. We know that and were chosen so that . Finally, we can use a calculator to compute that , so we get that , so the emission will end after years. Since Bitcoin launched in 2009, we get that the emissions will end in 2041.
But wait! Why is everyone saying it will end in 2040? Ahhh yes. This computation is only correct as long as is correct. In practice, the difficulty of Bitcoin is constantly increasing, and in the time it takes the difficulty adjustment to correct it, the block delays become ever so shorter. This difference is not very perceptible in our everyday usage of Bitcoin (it is far smaller than the typical noisiness of block creation), but it accumulates over time, reducing the estimate by a little bit.
Last updated