Proof-of-Work is currently the most common consensus algorithm for blockchain technologies, including the Bitcoin. A proof of work is a piece of data which is difficult (costly and time-consuming) to produce, but easy for others to verify.
Producing such data can be a random process that requires a lot of trial and error before a valid proof of work is generated. This work is done by the “miners”. For a block to be valid it must hash to a value lower or equal than the current target. The target is a 256-bit (SHA-256) number that all clients share.
A hash algorithm turns data into a fixed-length hash and modifying the data by one bit, for example turning 0 to 1 or the other way around, will change the hash completely.
Since each block contains the hash of the preceding block, each block has a chain of blocks connected to it that together contain a lot of work.
The attacker must now “race” against the honest nodes: He has to do all the work faster then the rest of the honest nodes, and therefor have a higher hashrate, which comes with extreme hardware requirements and high energy consumption and is there for expensive and next to impossible. (find x such that f(block x) < t (cryptographic hash)
However, Proof-of-Work also has problems for honest miner: Due to the computational resources needed, this consensus algorithm (PoW) is very energy-intensive, which can cause the miners to concentrate to one point, where mining is more efficent (mining pool) and energy isn’t expensive (China). This partially defeats the goal of decentralization.
Proof-of-Stake is an alternative consensus algorithm for blockchains, that attempts to solve the issues associated with the “mining” process: Environmental damage through hardware and electricity and the overall electricity consumption, by removing the concept of “mining” entirely. Peercoin for example uses this algorithm.
The mechanism in Proof of Stake can be described as a form of “virtual mining”: Instead of relying on computer hardware like Proof of Work does, Proof of Stake relies on the coins inside the blockchain.
Think of it this way: With Proof of Work, a user buys a mining computer for 1000$, plugs it in and starts mining. The above described issues would occur. With Proof-of-Stake, a user would buy coins worth 1000$ and deposit them into the Proof of Stake mechanism and become validator. The PoS mechanism will then (pseudo-)randomly assign a validator the right to produce blocks.
If that validator does not create a block with a period of time, a second validator is selected that can create the block instead.
Note that deposing 10x more coins into the mechanism, will also increase the chance of becoming a validator by 10x and thus earn around 10x more rewards. This is similar as investing into mining hardware.
Through this mechanism less quantity of energy of electricity is required in order to secure a blockchain and the centralization risks are reduced, since economies like energy and hardware costs are much less of a factor compared to PoW.
Shift uses the Delegate Proof of Stake algorithm. dPoS tries to moderate the potential negative impacts of centralization through the use of witnesses, also known as delegates. There are 101 witnesses (SHIFT), which are voted on by those using the network, that sign the blocks. Additionally, each block signed must have a verification that the block before it was signed by a trusted node.
By using a decentralized voting process, dPoS is by design more democratic than comparable systems: Instead of eliminating the need for trusting all nodes, dPoS has safeguards to ensure that the trusted delegates are signing the blocks correctly.
Through the elimination of the need to wait until a certain number of untrusted nodes have verified a transaction before it can be confirmed and the ability of the blocks to contain more digital events, there is an increase in speed of transaction times compared to PoS and PoW.
While dPoS focuses to be decentralized, it still has some controlled centralization. Every client in a dPoS system has the ability to decide who is trusted and become a delegated representative of the majority of users themselves, rather than trust concentrating in the hands of those with the most resources as it is with Proof-of-Work.
But how does voting work? Every shareholder gets to vote for a representative to sign blocks in their stead. Anyone who can gain 1% or more of the votes can join the “board”. The representatives become a “board of directors”, signing blocks. If one of the directors misses their turn, clients will automatically devote them and eventually someone else will join. Just like other mechanism, the delegates are rewarded to make it worth their time ensuring uptime.
In a nutshell, dPoS tries to give shareholders a way to delegate their vote to a key (without virtual mining), maximize the dividends shareholders earn and the performance, while minimizing the amount paid to secure the network and keep it running.