There can never be more than 21 million bitcoin. From an investment standpoint, this is a good thing: Bitcoin can have long-term value because it’s finite. Additionally, we won’t have mined all the bitcoin until 2140. But the ever-decreasing availability of new bitcoins is already affecting the market and will have serious consequences way before 2140.

In fact, we’ll have mined close to 100% of bitcoin by 2040. Though bitcoin mining will still be theoretically possible for another 100 years, bitcoin’s price and the nature of its transactions will never be the same. Here’s what you should know about the impending cap on one of the world’s most valuable currencies.

We’ll Have Mined all 21M Bitcoin by 2140

2140 is the theoretical year we will create the last bitcoin block. Thereafter, it will be impossible to make even a fraction of a new bitcoin—no matter the demand. Per the law of supply and demand, bitcoin’s value could increase significantly once its supply becomes fixed.

What people forget, is that the rate at which we can create bitcoin is decreasing incrementally. By design, the speed at which you can build blocks on bitcoin’s blockchain slows every 2,016 blocks. And every 210,000 blocks, or four years, the number of bitcoins you’re rewarded for creating a block is cut in half. For this reason, bitcoin mining is becoming exponentially slower, and will eventually cap off at 21 million bitcoins.

Correspondingly, the price of one bitcoin could increase slowly, too. It won’t spike at 2140 once we’ve mined all the bitcoin.

Today, we’ve already mined 82% of the world’s bitcoin. By 2040, we’ll have mined close to 100%. Though bitcoin mining will be possible until 2140, it may not be profitable since its difficulty increases exponentially. Mining nodes will require higher and higher hashrates—the speed at which they can solve bitcoin equations—and receive diminishing rewards. You would need a lot, perhaps an infinite amount, of computing power to create the last bitcoin block.

In other words, the mining cap has consequences beyond giving the currency value today. The approaching end of bitcoin mining could affect those already invested as well as people looking to buy in way before 2140. And the first people to feel the consequences will, most likely, be those closest to the creation of new blocks: bitcoin miners.

Bitcoin Mining Today

Bitcoin miners keep bitcoin alive by minting new coins and creating new blocks, i.e. validating transactions. In exchange, bitcoin miners receive bitcoin and transaction fees. Today, the value of bitcoin is such that the newly created, or “minted,” coins miners earn are the bulk of their mining income.

But the golden era of bitcoin mining won’t last forever. Mining requires a lot of energy, never mind the cost of equipment. Today, bitcoin has a bigger annual carbon footprint than Switzerland. However, there is no shortage of bitcoin miners because the price of bitcoin is high, meaning that the new coins they receive offsets the price of running a mining pool. But one day, the cost of mining bitcoin could overshadow its rewards.

How Bitcoin Miners Make Money

One way bitcoin miners make money is through transaction fees. These fees are related to supply (bitcoin blocks) and demand (how many people initiate transactions). Transaction fees also vary depending on how many bytes are in a transaction. The number of bytes per transaction is determined by the number of outputs rather than by the amount of bitcoin transferred.

A standard bitcoin transaction is 258 bytes. Today, it costs around 12 Satoshis per byte. A Satoshi is 0.00000001 BTC. Currently, the average transaction fee is 60¢.

More significantly, bitcoin miners also earn 12.5 bitcoin every time they complete a new block. This comes to around $78,000. Before 2016, miners earned 25 bitcoins per block.

Though this sounds like a lot of money, keep in mind that processing bitcoin require a lot of energy—215 kWh to be specific. In America, one kWh costs 12¢ on average. This means that it takes at least $2,400 to confirm one bitcoin transaction. By selectively processing transactions based on bytes, and receiving 12.5 bitcoins per block, bitcoin miners can make a sizeable profit. This is especially true if you’re mining in a country where energy is less expensive, like China.

But bitcoin rewards won’t stay at 12.5 per block forever. In fact, they’ll be cut in half again in 2020.

Are Transaction Fees Enough to Sustain Mining?

As bitcoin miners are rewarded with fewer and fewer bitcoins, they’ll have to depend on transaction fees. Even before we’ve mined all the bitcoin, many bitcoin miners will rely solely on transaction fees for income because mining a block will become increasingly difficult. But with the current rates of electricity and transaction fees, mining could soon become unprofitable. Fewer miners would translate to longer processing times or no transaction processing at all.

One way to incentivize miners would be to increase transaction fees. This could happen organically if bitcoin were more widely adopted. In other words, more demand for transaction processing means higher fees. This happened in January 2018, when transaction fees peaked at around $54 dollars. But if transaction fees are too high for too long, no one will initiate transactions. No transactions also mean no income for miners.

Some people argue that we won’t need to incentivize miners at all; The bitcoin market will do so naturally. In other words, because there will be no more new bitcoin, the value of preexisting coins will steadily increase. Even if transaction fees remain low, they would be worth more than ever before.

But one big unknown remains: What will technology look like in two decades? Trying to imagine what 2140’s version of mining equipment would be like predicting the rise of cryptocurrency at the dawn of the Information Age. We can only guess that mining will become more efficient and economical.

And the cheaper bitcoin mining’s overhead is, the more people will participate. This could get to the point where mining is so prevalent that it’s no longer a significant source of income. Mining could be another job rendered obsolete by blockchain and AI.

The Value of Bitcoin after it’s all Mined

Whether or not you’re a bitcoin miner, the big question regarding the end of bitcoin mining is: After we’ve mined all the bitcoin, how much will it be worth? It’s already more than gold. Here are the factors that could influence bitcoin’s price in 2040 and 2140.

Supply and Demand will Increase Bitcoin’s Value

Like everything, the less bitcoin there is available, the more existing bitcoin is worth—as long as people think it’s valuable in the first place. Looking back at the history of bitcoin, its price increase will, most likely, be incremental. Since everyone knows when the reward for bitcoin mining will be halved, people plan their mining and investments accordingly.

The only real reference point we have for what will happen to the price once we’ve mined all the bitcoin is past “halvenings.” A “halvening,” or halfing, is the moment when the reward for completing a bitcoin block is cut in half. Every time a halvening occurs, mining becomes less profitable, and therefore less popular. Correspondingly, investor interest and bitcoin’s price go up.

This graph shows the last halvening, which occurred on July 9, 2016. On that day, the reward for completing a bitcoin block fell from 25 to 12.5 bitcoins. It makes sense that there would be a slight dip in bitcoin’s price (i.e. in coin investment) right before, and a consistent increase afterward.

This trend could persist with each halvening. Additionally, bitcoin’s price could continue to increase as supply dwindles. All this should contribute to a steady, rather than meteoric, rise in the price of bitcoin. Overall, an increase in the value of bitcoin could lead to a $700 billion market cap for blockchain and cryptocurrency by 2021.

A Lot of Bitcoin is Out of Circulation

There are a lot of things we don’t know about bitcoin—going back to its mysterious founder. Satoshi Nakamoto, the pseudonym for bitcoin’s founder, supposedly owns the largest supply of bitcoin. People speculate that his personal stash is somewhere between 900,000 and 1 million BTC, 5% of the world’s total bitcoin market.

But Nakamoto isn’t using his bitcoin. In fact, some people speculate that he’s waiting until more bitcoin is mined before doing anything. After all, bitcoin cannot reach its peak price until we’ve mined all the bitcoin, or as close to 100% of it as possible.

If Nakamoto were to release all his crypto at once, it could crash the market. Not only that, but the perception that the founder of bitcoin, and the cryptocurrency movement, on the whole, was abandoning ship would be catastrophic.

Bitcoin is the original decentralized currency. However, Satoshi Nakamoto controls much of it from both a financial perspective and in the hearts of its most devoted investors. In other words, one person’s decision could alter bitcoin’s market forever. And few, if anyone, has any idea when or why this would happen.

Regulation Could Restrict Bitcoin’s Value

Another big unknown is whether or not regulation will be favorable to cryptocurrency. Today, ICOs are already subject to federal laws because the government treats them like securities.

And cryptocurrency threatens to upset our established financial system. First and foremost, it isn’t in the banks’ best interest to have people using cryptocurrency. By using cryptocurrency, you’re cutting the credit card company and your bank out of processing fees. The financial sector is the first industry that blockchain will upset. As a response, financial services companies filed the most blockchain patents in 2017, and are building their own blockchain and crypto-related platforms.

Not only can financial institutions influence government cryptocurrency regulations, but widespread cryptocurrency adoption isn’t in the federal government’s best interest, either. Calculating the earnings, and therefore the taxes, of bitcoin users is difficult. This is because cryptocurrency’s transactions exist on a decentralized blockchain. In other words, there isn’t a centralized organization, like a Bank of America or Visa, that processes your transactions.

According to Tax Policy Center, income taxes represent the vast majority, or 47.3%, of the federal government’s income. The more people use cryptocurrency, the harder it is to track people’s earnings and collect taxes. In other words, the decentralization of cryptocurrency threatens to make centralized authorities like the government itself, obsolete.

All this could mean that the recent SEC rulings on bitcoin ETFs are only the beginning of cryptocurrency regulation.

Politics and Economics Could Increase Bitcoin’s Value

On the other hand, politics and the economic climate resulting could widen bitcoin’s appeal. For one, bitcoin was the final movement to come out of the 2008 Financial Crash. Like Occupy Wall Street and the Tea Party, bitcoin, a currency that functions independently of governments and big banks, arose from the distrust of financial institutions.

And trade wars, recession, inflation or any political-economic upset could spur bitcoin investment. While U.S. and European governments turn towards nationalism, cryptocurrencies let you buy or exchange anything across the world, no matter the political climate.

With a market cap of over $100 billion, bitcoin is already the most widely used and trusted alternative to fiat. It could become an even more valuable alternative once we’ve mined all the bitcoin.

What Happens after We’ve Mined all the Bitcoin?

2140 is a long ways away, but we could reach bitcoin mining’s point of diminishing returns in the next two decades. By 2040, almost all bitcoins will be in circulation, which could correspond to an increase in bitcoin’s price and a decrease in miners.

What will happen when the rewards for bitcoin mining decline and disappear entirely? For one, transactions fees could increase, either naturally as the demand for transactions grows with wider bitcoin adoption, or purposefully to incentivize miners. Additionally, as the value of bitcoin increases, so does the value of transaction fees, even if the amount remains relatively low.

However, we don’t know what the future of bitcoin mining will look like. Considering the speed at which massive mining pools have developed, it will probably be a much more efficient process than it is today. This could mean that mining becomes a passive, rather than active, process. Will we even need miners in a future dominated by AI and blockchain?

And after we’ve mined all the bitcoin, what will it be worth? Simply put, decreasing supply and increasing demand could raise its value continually over the decades to come. But investor interest, big banks, government regulations, and Satoshi Nakamoto could also stifle bitcoin’s growth.

Conversely, global politics and economics could spur bitcoin adoption. The more tumultuous and restrictive governments become, the more likely people are to turn away from fiat, meaning currencies connected to a centralized treasury.

What will happen after we’ve mined all the bitcoin? There’s no way to know for certain what bitcoin will be worth or what bitcoin mining will look like in the future. But don’t forget that bitcoin is a public decentralized ledger. No matter what happens, we will see it all—market cap, transaction fees, and halvenings—happen right before our eyes.