Proof-of-Work vs. Proof-of-Stake in Blockchain: Bitcoin vs. Qtum

in #cryptocurrency7 years ago

INTRODUCTION

The innovation of the blockchain is really a process to figure out how to update a ledger that is shared on decentralized servers with a new block of transactions, hence reaching a consensus.

The idea of proof-of-work and proof-of-stake, are both ways through which consensus is reached in a decentralized or distributed system. This consensus or agreement on what is true or false between nodes on a blockchain is what makes blockchain based cryptocurrencies work.

DigitalBrain-20150812091648187.jpg

BITCOIN: PROOF-OF-WORK

Proof-of-work consensus algorithm is a means by which someone can prove to others on a distributed network that they have carried out a significant amount of computational effort. It allows a participant on the blockchain display a forge proof number which can be used to determine how many Joules of electricity that was consumed to create that number. That number is in itself an artifact, a monument of immutability, a proof that you have done the work. Imagine the possibility of presenting a number to a system that has never seen the history of the blockchain, and the node knows the amount of work it took to generate that number. Bitcoin is a monument of immutability, built block by block that cannot be changed or forged without the other person knowing that it has been changed, and without expending the same amount of work/energy it took to create it.

• Mining in Bitcoin
In Bitcoin, consensus is reached through a process called mining. This is carried out by special nodes on the blockchain known as miners, who earn the right to validate and add the next block of transactions by solving an energy intensive cryptographic puzzle, hence “Proof-of-work”. This puzzle is difficult to compute but easy to verify. Similar to the lottery, the more tickets you buy the greater your chance of winning, the more processing power each computer puts in the greater their chance of winning.

tx.png

The correctly generated hash is added into the next field as previous hash, putting the blocks in a chain.

Qtum: Proof-of-Stake

The Quantum blockchain (Qtum) as stated in their white paper “is a combination of Bitcoin Core, Proof-of-Stake, and the Ethereum Virtual Machine (EVM)”. Its Qtum Core allows for the execution of Smart contracts on a proof-of-stake model. The major difference between proof-of-stake and proof-of-work is that proof-of-stake mainly uses the underlying native assets to stake into the consensus algorithm.

A participant stakes a particular amount of his currency in validating a block, with the risk of losing the staked asset (money) if he fails. On the other hand if the validation process is correct, a small fee is gained.

In the proof-of-stake consensus algorithm, block validators are selected based on a simulated combination of random selection. Here the group or entity with the highest stake has a higher probability of winning. This consensus algorithm unlike proof-of-work does not come with the creation of new currencies/tokens. Only transaction fees are gained.

• HASH FUNCTIONS, MERKLE TREE, AND MINING
The idea “Proof-of-work” is linked to other blockchain concepts such as hash functions, Merkle tree, and mining. A brief introduction into these concepts will shed more light into better understanding of the concept.
The Bitcoin ledger is based on a Merkle tree data structure that is continuously growing. Its inner workings are built upon what is known as a cryptographic hash.

A hash is a one way function that has multiple uses in blockchain and distributed/decentralized systems. It takes any digital media and runs an algorithm on it to produce a unique fixed length digital output known as a hash. This is normally much smaller than the original input. The hash function can equally be likened to a Smoothie Machine. The fruits or veggies are the digital media. Once they are blended together, we cannot get back the digital media. However the taste of the output smoothie is its digital signature.

• A SIMPLE EXAMPLE OF HASHING BITCOIN TRANSACTIONS
Hashes in combination of peers produce what is called a Merkle tree, which is an essential part of a blockchain for data integrity.

Proof-of-work in Bitcoin requires guessing a number known as a [Nonce] which can generate a hash (Alphanumeric character) that begins with four Zeros (0000). The [Mine] button in the figure below runs a function on the following: Block Number, Nonce, Transactions, and Previous Hash, to create the valid new hash. If the generated hash does not begin with four zeros, then it means that the transactions have been altered, or the nonce is incorrect. This in security means tamper evidence. The guessed Nonce is now the proof that the particular block of transactions has been solved.

Here is how it works under the hood:

• First step is to add a coinbase transaction, along with a mostly hard coded staking transaction.
• Second is the process of preparing blocks which includes transactions from the network.
• The third step is to compute a Proof-of-Stake (PoS) “kernel”.
• Forth is a computation of “Staking difficulty”
• A comparison of the kernel’s hash against the staking difficulty
• Continue to a valid Proof-of-stake block if the hash meets the difficulty, else go back to step 1
• Finally, the block header is signed as a confirmation that you own the staking transaction.

The Proof-of-stake kernel is a very significant part of the solution, in the sense that its content cannot be easily changed in the block. Another important feature is the staking difficulty, which is taken from Bitcoins’ standard difficulty. If a single coin is staked the standard difficulty is maintained, however staking 2, or 4 coins imply that the difficulty will be halved or quarter respectively. Some restriction mechanisms are put in place for ensuring that the network is not being controlled by a single entity. This is done by putting a limit to the amount of staking coins, consequently a benchmark which the difficulty can be reduced.

CONCLUSION

In conclusion, proof-of-work and proof-of-stake algorithms can both coexist. This is because there would be applications that would require a more robust level of immutability, while another may not require that amount of immutability.

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.029
BTC 57617.33
ETH 3012.20
USDT 1.00
SBD 2.39