Abhishek Singh, the Program Director at Blockchain Semantic answers the question on Quora: What is Proof of Stake and Proof of Work?
Proof of Stake
Proof of Stake is another consensus algorithm being evaluated and slowly adopted by a few Blockchain networks. Here, miners do not have to solve any mathematical puzzle and burn computing power and electricity. There is no competition for validating transactions to earn rewards amongst miners. Miners are simply ‘tapped on the shoulder’ or nominated to verify each transaction.
Why is it called proof-of-stake then? That’s because miners have to stake a certain number of coins of the Blockchain network where they want to participate in the consensus process. The more cryptocurrency you stake the higher your chances of getting nominated to verify a transaction and getting the reward for doing so. Amount of cryptocurrency could also be replaced by or used alongside age of the miner in the Blockchain. You probably understand by now that miners are then not even the right name to call them by, let’s call them creators. They create blocks after all even if they do not ‘mine’ the blocks.
Proof of work
A proof of work is a piece of data which is costly and time-consuming to produce but easy for others to verify. Producing a proof of work involves solving a mathematical puzzle which requires trial-and-error. It is a GPU-intensive process involving hashing of data. Whichever miner solves the puzzle first gets the reward.
Hashing is a cryptographic technique which maps data of arbitrary size to data of a fixed size. There are multiple algorithms for it. The SHA-256 algorithm is used in Bitcoin. When SHA-256 is applied on a content, it results in a fixed length output. Any change to the content would result in a new output. The content can be a single letter or a page full of texts, the output would always be of the same length. Hashing is useful in determining the purity of the content.
Role of hashing in proof of work
A block contains a set of transactions, nonce and a few more things. Blockchain adds a variance called nonce in each block. This nonce is like a salt added to the contents of a block. As you can suspect, due to the introduction of a nonce, the hash output of the contents of the block will change. The puzzle that miners solve is to identify the value of nonce so that the hash output of the block being mined starts with a specific number of leading zeroes. Note, the hash of the contents of the block being mined should start with a specific number of leading zeroes. The value of the nonce that will achieve this is basically what miners are trying to solve for. The number of leading zeroes to achieve is called the difficulty of the Blockchain network at the time of mining. The difficulty is decided by the Blockchain network itself. As you can imagine, the higher the difficulty set, the more difficult it will be to evaluate the nonce. There is no formula to calculate nonce. It is just a series of hit and trials. This evaluation of nonce to achieve a hash value of the block data which honors the set difficulty is the “work” that the miners perform. The right value of the nonce is the output at the end of the work.