Keeping the blockchain is called mining. People engaged in mining are rewarded with freshly created Bitcoins. Miner can be anywhere in the world. When you are a BTC network user, you share your computing power needed to keep it working – as a reward you get new BTC coins.
Where are the coins coming from?
The coins are from voluntary donations of users and from the pool of all 21 million coins, which can be mined (BTC protocol limits coins supply to this exact amount). Mining is in other words generating new coins for the needs of system.
What are the rules of Bitcoin creation?
The number of coins which can be mined in one blockchain is fixed and divided among every miner. The rules of the system say, that in time the number of prize is smaller. Currently it is 12.5 BTC for one block – then it will decrease (on average every 4 years, exactly every 210,000 blocks) to 6 BTC (probably in 2020), going lower until the moment of last coins being mined.
As the number of miners is changing, system is completed by additional thing – more miners, stronger the encrypting of the data. It means that big popularity of BTC makes mining a single coin much harder – you need more computing power to mine one block. Blocks are generated every ten minutes and full loop every 2016 blocks (about two weeks). After analysis of the block generation speed and solving a loop system sets new difficulty level. Right now, it means that home computers are not enough to successfully mine Bitcoin.
On the market there are special computers – so called mining machines – which are many times more powerful than normal devices. It doesn’t change the fact, that average user has no chance to compete with so called Bitcoin farms.
What is a Bitcoin farm?
Typical Bitcoin farm is based on a simple solution – more computing power it generates, more BTC it will get. Therefore, all over the world huge farms are created (they are like server rooms) just and only to use in mining.
Computing speed of the biggest farms is counted in petahashes per second. These farms may need as much as 21 megawatts of power! Of course, there are also smaller farms.
Is it safe?
Theoretically if one miner has 51% of computing power of whole network, he has a possibility to attack by sticking his own blocks to the one existing, which were mined earlier. It can cause reversal of the transaction and using one more time the same coins.
In practice, the power of the network is huge, and this kind of attack is almost impossible and at least not worthy.
How can I mine Bitcoin?
SHA-256 is an algorithm used by Bitcoin, so you need to choose powerful hardware. Currently the mining on GPU is no longer profitable. There is a special hardware called ASIC or FPGA (link to comparison below). Mechanism used to connect blocks is called proof-of-work so to join the process of blockchain creation, you need to put some work.
Interesting Bitcoin links:
https://en.bitcoin.it/wiki/Block_hashing_algorithm – detailed mining description
https://en.bitcoin.it/wiki/Mining_hardware_comparison – comparison of mining hardware
https://www.bitcoinblockhalf.com/ – the most important parameters of Bitcoin network
https://coinmarketcap.com/ – cryptocurrencies market cap