This is a fascinating question. Of course, the first answer is rather boring: "the difficulty of mining is constantly changing, so the law of supply and demand will ensure there are always miners." However, it we set this part of the answer aside, we get to dig deep into what a bitcoin really is, and that's what makes this question so much fun.
When you offer something of value, such as a good or service, in exchange for a bitcoin, you are making the assumption that everyone makes when they use a currency: that the buyer can give you something of value in return for your good or service. In the case of cash, it may be nothing more than a piece of paper which you trust other people will find value in. Bitcoin is the same way, but a bit more nuanced.
If you are receiving a bitcoin in exchange for your good or service, you start by creating a "private key" for a bitcoin account, which is basically a random number. Now when you get "paid" in bitcoins, what actually happens is that the buyer publicly announces some information which makes your private key worth something. This something is the body of the transaction, which includes the information that proves the buyer is in a position to transfer a bitcoin.
What makes this information valuable is that you have confidence that, with that public information in hand, your "private key" is now empowered to make you a buyer of someone else's goods and services. It's a bit exotic sounding, if you ask me. The buyer effectively blesses a random number that only you know to have some value by uttering a phrase, but if you really look at what happens when a buyer announces a transaction to be added to the block chain, that's what they're really doing!
Of course, the value of that information is only worth what the next seller of goods and services will accept its value as. One of the fundamental assumptions which sellers use to determine if your private key for a bitcoin account is valuable is whether the previous transaction could ever be "double spent," meaning the person who bought your goods and services uses that bitcoin to "bless" two separate transactions when they were only supposed to use it once. In cash terms, this would be the equivalent of photocopying a dollar bill and spending it twice. And that's where mining and the block chain becomes important.
With bitcoin, there is a master ledger known as the "block chain." If someone uses a coin to bless someone else's account (i.e. they spend the bitcoin), and that action appears on the master ledger, others are expected to recognize that that coin cannot be reused to bless a second account (i.e. double spent). This ledger is consistent, containing no double-spent coins.
The miners maintain this master ledger. They are paid to do so (by both the "freebie" coins that are minted for the miner with every block and by transaction fees paid on each transaction), and their services are to make it computationally infeasible for anyone to "cheat the system" by breaking down this one master ledger guarantee.
Without miners, there would be nobody to maintain this master ledger. A coin would only be worth how much people trusted it would not be double spent.
There are solutions to this:
- Your solution is that a government entity comes in and becomes the de-facto maintainer of the master ledger in the absence of miners. This turns the currency into something more like a traditional currency backed on the faith of the nation issuing it.
- You could have each individual player try to pitch in and help authenticate the web of transactions in the absence of a formal block chain. This is the approach Iota is using.
- You may find that your bitcoins are utterly worthless, as nobody values your ability to utter a key and unleash the bitcoins you earned.
Of course, none of these will come to pass. In reality, the difficulty of mining a new block scales, as many of the other answers have put forth. Eventually the difficulty will drop low enough that it will become profitable for miners to mine (just as it was profitable in the early days of BTC). The tradeoff, of course, is that the easier it is to mine a new block, the easier it is for a hostile entity to apply enough hashing power to corrupt the block chain, forking it so they can double spend coins. Bitcoin is resilient against such computational attacks because the difficulty of mining is high enough.
What if a restaurant gets so crowded that nobody goes to it? Won't they go out of business? – David Schwartz – 2019-05-19T00:40:33.343
2Difficulty was only 3 billion when I started. Ah, the good old days. – 4276 – 2017-12-25T18:13:23.043
2FYI: coins that don't use a blockchain but a DAG (directed acyclic graph) can exist without miners (iota, byteball) – RobSeg – 2017-12-26T14:31:11.107
3
Whether or not it's profitable... Sometime in ~2140, due to Controlled Supply there will be no more coins to mine (or there abouts, depending on increases or decreases in mining capacity).
– WernerCD – 2017-12-26T17:47:56.0173One newbie comment (from a newbie!) When folks hear about bitcoin mining they assume it means, finding new bitcoins. But, the other function of bitcoin "mining" is, proving transactions. – Fattie – 2017-12-27T17:49:36.197
The main trick is that no one can not mine the treasures using his
personalfacilities. – D L – 2018-02-18T22:22:44.227