As I understand it mining provides the security for the blockchain in that it makes it hard to forge a transaction. The incentive for finding eligible hashes is a reward in the form of Bitcoin. As more blocks emerge, the cost of mining increases. But the number of bitcoins is limited to 21M.
Won't that mean that at some point in the future, either all bitcoins will be gone, or mining will not be cost effective anymore?
And in both cases, why would anyone still mine? Then wouldn't the hash rate drop considerably and thus the security?