Mining – is a process of validating a transaction or block in a network by the process of complex algorithms to prove and validate the correctness of the transaction and thereby add the new block to the chain.
In order to mine coins, you need to have high power processor based computers running continuously with the complex mining algorithms. When a transaction happens in the coin’s network, the more computing power you have, the more likely you could get to validate the transaction faster than other miners and hence may earn a fraction of a coin as a reward.
Proof of work is a protocol that has the main goal of deterring cyber-attacks such as a distributed denial-of-service attack (DDoS) which has the purpose of exhausting the resources of a computer system by sending multiple fake requests.
Mining serves two purposes:
When you set a transaction this is what happens behind the scenes:
– Transactions are bundled together into what we call a block;
– Miners verify that transactions within each block are legitimate;
– To do so, miners should solve a mathematical puzzle known as a proof-of-work problem;
– A reward is given to the first miner who solves each block’s problem;
– Verified transactions are stored in the public blockchain.
From a technical point of view, mining process is an operation of inverse hashing: it determines a number (nonce), so the cryptographic hash algorithm of block data results in less than a given threshold.
This threshold, called difficulty, is what determines the competitive nature of mining: more computing power is added to the network, the higher this parameter increases, increasing also the average number of calculations needed to create a new block.
Proof of Stake (PoS) is an alternate way of verifying and validating the transaction or a block. This will pick the Validator (Equivalent of “miner” in the PoW) by the amount of stake(coins) a validator has and the respective age of the stake. The Validators earn the part or whole of the transaction fee.
In PoS system miners are called validators, instead.
The blockchain keeps track of a set of validators, and anyone who holds the blockchain’s base cryptocurrency (in Ethereum’s case, Ether) can become a validator by sending a special type of transaction that locks up their Ether into a deposit. The process of creating and agreeing to new blocks is then done through a consensus algorithm that all current validators can participate in.
PoS miner is limited to mining a percentage of transactions that is reflective of his or her ownership stake. For instance, a miner who owns 3% of the Bitcoin available can theoretically mine only 3% of the blocks.
PoW drawbacks:
– More electric power;
– High computing power hardware which is expensive;
– There is no loyalty, people can migrate to mine any other coin;
– The only fees that will be earned will come from transaction fees which will also diminish over time as users opt to pay lower fees for their transactions. With fewer miners than required mining for coins, the network becomes more vulnerable to a 51% attack. A 51% attack is when a miner or mining pool controls 51% of the computational power of the network and creates fraudulent blocks of transactions for himself, while invalidating the transactions of others in the network.
– Bitcoin’s biggest problem is not even its massive energy consumption, but that the network is mostly fueled by coal-fired power plants in China. Coal-based electricity is available at very low rates in this country. Even with a conservative emission factor, this results in an extreme carbon footprint for each unique Bitcoin transaction.
– Bitcoin’s PoW system consumes more energy per year than whole Bulgaria or Denmark.
– In December, energy spent on mining BTC changed from 30TWh to 36 TWh and it is equal to about 4,68 bln. USD per year(calculated by DC area electricity price which is equal to 1kWh=0.13usd). Emphasize that it is the only energy consumption for BTC, while there are plenty of other coins. In comparison this amount of energy would be enough for 3,6mln. of houses in the US.
In a distributed consensus-based on the Proof of Work, miners need a lot of energy. One Bitcoin transaction requires the same amount of electricity as powering 1.57 American households for one day (data from 2015).
PoS advantages:
PoS disadvantages:
– The possibility of long-range attacks
– Initial distribution problem
– The possibility of a bribe
– Attack or nothing at state problem
The Etherium Foundation is working on the solution to all of this by implementing CASPER protocol which is based on proof of stake. CASPER protocol could change Ethereum blockchain and make it faster and safer.