Bitcoin is the first and foremost cryptocurrency ever created. It is the digital currency which is created, used and maintained electronically. The transactions of a digital coin are written in Blocks and maintained in the Block Chain, which is a distributed, transparent and digital ledger.
During the process of mining the Bitcoins, the miners (computer nodes with high power graphic processors) of the network solve the hash algorithms, difficult math problems and mine a block to earn bitcoins as reward. This is how Bitcoins come into market.
The original idea of Proof of Work belong to Cynthia Dwork and Moni Naor way back in 1993, the term was coined by Markus Jakobsson in 1999 and it is put into use as the back bone of the trustless Bitcoin mining by Satoshi Nakamoto in 2008.
When you talk about trustless and distributed consensus, it means to send or receive money without any third-party in between. Say, I have to send $500 to my friend, I will pay using a third party mediator like Bank, which will deduct amount from my account and deposit into his account. Bitcoin comes up as trustless and distributed consensus where, I need not believe in any Bank to pay amount to my friend. I can directly transfer money using the distributed system and everybody in the network will know about the transaction. There will be complete transparency.
Bitcoin and other digital currencies enable everyone in the network to have a copy of the Block chain which is a digital ledger. No one need to trust anyone, because everybody can directly verify the transactions. Every node or user will have a copy of the verified block chain.
Now, who will verify the transactions and what is the proof that these transactions how will you believe that these transactions are verified. Here comes the concept of Proof of work.
The miners solve cryptographic puzzles to add transactions and create a new block.
To create a block, the miners will verify and reject millions of hash values per second until they can get the Nonce to create a new block. The miner who creates a new block will get 12.5 Bitcoins as reward.
In this process hundreds of miners use their computational power to arrive at the correct hash value to create the block. When there are more miners in the network, the difficulty of the puzzles increases to make it hard to solve.
The most widely used Proof of work hash value is based on SHA-256 algorithm. There are other hashing algorithms like Scrypt, Blake-256, CryptoNight, Scrypt-n are also used.
Once a block is created, the miner will release the proof of work, that he has created a new block and it is not any duplication. This proof of work is very difficult to create, but can be verified easily by other miners in the group.
Once the miner presents his block to the network for verification, the other miners will verify and accept the block and the block is added to the longest Block chain if the network. During this verification process, minimum 51% consensus has to be arrived at to add a new block into the Block Chain.
Proof of work is the essence of Bitcoin Block chain which is the first ever cryptocurrency in the world. However, there are some fundamental flaws in this system.
It eats up a lot of energy and computational power as miners compete to create a new block for the reward Bitcoins. Few studies have proved that with the energy used to run and maintain the Bitcoin network can be used to power of millions of homes.
It is not a fair game, because pool of miners using their combined computational power, or people with more powerful ASICs will have a better chance to mine a block faster than others. This concept is against total decentralization of the system as the network will be ruled by Miners or pools of Miners who have more hash power and money to afford that much electricity and systems.
Theoretically, big mining pools with more than 51% control over the Bitcoin network can rule the Network.
To combat the disadvantages of Proof of work, Ethereum looked at Proof of Stage as the solution.
Proof of stake is generally applied to the cryptocurrencies like Ethereum where Coins are premined. Here miners are replaced with validators.
Validators will lock up some of the cryptocurrency they own as stake. It works as a kind of bet. Once they lock some coins, they will look up for new blocks to be added to the chain, and start validating them.
When they complete validating and append the block to the valid block chain, they will get a reward proportionate to their efforts and money put on stake.
In this kind of system, the number of coins you have betted as stake matters, because the larger your stake is, the higher the chances that you will be loyal to the system because you will benefit out of its optimal performance.
The system of Proof of stake is designed to select the people with high stakes, not only based on the amount but also based on other factors. The selection may be based on randomized block selection, coin age-based selection and master nodes etc.,
Monopoly which is possible in Proof of Work system has very few chances in proof of stake system because here the validator has to stake his money which makes it a costly affair. Moreover, the validator will behave more benevolently because the proof of stake investment is much higher than proof of work.
Proof of Stake is preferred because the transaction fee is much less compared to proof of work. Soaring electricity charges, return on investment being very low and depreciation on mining equipment makes the proof of work price go much higher. It makes a Bitcoin block much costlier to mine.