Delegated Proof of Stake (DPoS) is a consensus protocol designed for highly scalable blockchains.
UNo of the main challenges of blockchain technology, is the creation of consensus protocols. On these, the production of blocks, the validation, security and scalability of the blockchain weighs. Reasons that they are robust protocols and that they are designed for almost all kinds of scenarios.
One of those consensus protocols is Delegated Proof of Stake or Proof of Delegated Participation (DPoS). This is designed to effectively solve the scalability problems of blockchain technology. At the same time, it continues to guarantee a high level of security and robustness, compared to the Proof of Work (PoW).
Introductory course to DeFi
Medium levelTime to update. Traditional finance has changed, discover the revolutionary ecosystem of decentralized finance (DeFi).
But what is DPoS?
Delegated Proof of Stake is a consensus protocol designed for highly scalable blockchains. This algorithm was created by Daniel Larimer in 2014. The implementation of this protocol offers Byzantine Fault Tolerance (BFT). This means that it provides high levels of security for use on public blockchains. In addition, its operating model guarantees high levels of scalability.
To make this possible, all network participants choose by vote a series of "delegates". Once chosen, they form a group that allows the BFT protocol to be implemented. This is because their quantity is defined and limited, and there is partial trust in them.
Delegates define a rotation of leaders. This means that each delegate has a turn within the rotation to produce a block. Thanks to this action, said delegate can generate a block and collect a reward for it. If the delegate is not available when his turn comes, he must wait for a new one.
The voting power of each participant in the network is proportional to their participation in it. This characteristic is part of its relationship with the Proof of Participation consensus protocol. In order to favor decentralization, it is common for DPoS-based networks to vote on decisions related to their operation. Topics such as rewards, the number of delegates, behavior towards network forks and others. In addition to allowing delegates to be penalized if they do not behave as expected.
“The goal of DPoS is; decentralize power and make sure there is no censorship in the inclusion of transactions in the blocks.”
Daniel Larimer - EOS: Explanation of DPoS + BFT
How DPoS Works
The operation of DPoS can be divided into a three-part process, which are:
Delegate Voting
This is the starting point of the DPoS protocol. For its operation, a real-time voting system is used. Thanks to this, a group of limited and trusted parties, called “delegates”, is created. The voting process makes use of reputation algorithms. In addition, the number of tokens that delegates have is taken into account. The more tokens they have, the more votes they can receive. This translates into greater opportunities to be part of the delegates.
Block creation
The second stage of DPoS has to do with the generation of the blocks. At this point, delegates have the power to create blocks to add to the blockchain. At this point the operation is simple. During the generation cycle, each delegate has the ability to generate a block.
Once generated, the generation capacity passes to another delegate, and so on until the cycle is complete. During generation, transactions can be validated or denied. For each generated block and validated transaction, delegates receive a financial incentive.
Delegate Behavior Posted on Blockchain
This would be the last stage of operation of the DPoS protocol. This allows the community to constantly review the activity of the elected delegates. If the community does not like what it sees, it can expel a delegate. With this method, it seeks to control the operation of the network and prevent abuse.
DPoS Features
DPoS solves one of the most relevant problems that blockchain has, scalability. All this without having to use high power equipment and high energy consumption. However, to achieve this, it makes a sacrifice in decentralization. This is because block processing depends on a limited number of delegates.
This approach could allow such delegates to behave as a central entity. However, DPoS blockchains create other mechanisms to avoid these scenarios. Other relevant DPoS features are as follows:
- Offers Byzantine Fault Tolerance (BFT). This means that the protocol can be used in public blockchains safely.
- It works based on a voting system that takes into account the reputation and participation of users.
- It offers parallelization capabilities for tasks on the network.
- Optimize the use of network resources such as bandwidth, CPU, among others.
TaPoS - Transactions as Proof of Stake
Proof of Participation Transactions (TaPoS) is one of the unique features of DPoS. This allows each transaction on the network to optionally include the hash of a recent block. With this, the signer of the transaction can be sure that his transaction cannot be applied to any other instance.
This feature avoids situations of double-spending. In addition, its use helps all parties end up certifying the integrity of the transaction history.
Let's look at this as follows:
Daniel has decided to buy a book. Once the purchase is made, your transaction has been recorded. In this record, the hash of the most recent block of the store's blockchain has been included. This action is irrefutable proof that Daniel has made the purchase. But for the rest, for now, this is somewhat uncertain. To ensure the veracity of the transaction, Erika, María and Pedro carry out the same purchase process and sign with their unique hashes. Each hash tied to a block and a specific transaction.
Due to the nature of merkle tree of the blockchain, each block in history is "stamped" with the hash of the previous block. In this way, the transactions carried out by our friends further ensure the operation of the network. This is because each "brand" creates a unique footprint throughout the blockchain. A print that if changed will invalidate the rest.
Advantages and disadvantages of DPoS
Advantages
- The "delegate" voting system is fast. You can quickly set up block producers in each round. The direct result of this is a noticeable improvement in the scalability of the blockchain.
- Decentralize participation in the network. This is thanks to the fact that DPoS relates the participation in the network with the amount of tokens that each user has. Which encourages user participation.
- The parallelization achieved by DPoS enables high performance and scalability. For example, on the EOS blockchain, 0,5 blocks are generated each turn (126 seconds). This gives us an idea of the high transaction capacity that these blockchains can achieve.
- It allows to maximize the profits of the holders of tokens. This is because as they have more tokens, the more participation they have in the network and the more blocks they can create.
- The cost of maintaining network security decreases. This is due to the fact that it is not necessary to have high power equipment for the correct operation of the network.
- Optimize the use of network resources such as bandwidth, CPU, among others.
Disadvantages
- The success of the network requires the participation and coordination of the genuinely interested community for effective governance.
- DPoS exposes the blockchain to failures related to the voting system. For example, DPoS users with small bets may decide that their vote doesn't matter compared to the votes of larger stakeholders.
- Some detractors of the DPoS model argue that this protocol promotes centralization. This under the assumption that the voting system will always seek to choose those who have the most tokens. However, the blockchains that make use of it, create mechanisms to avoid this situation. At this point, this weakness is more related to the application of fair rules to elect delegates.
Blockchains that use DPoS
The first blockchain that made use of this consensus algorithm is that of the platform bitshare. BitShare is a project created by Daniel Larimer himself and works as a decentralized exchange (DEX).
Other projects that make use of DPoS are: EOS, Lisk, Ark y Tron. All of these blockchains have one characteristic in common: high scalability. A feature made possible by the use of DPoS as a consensus algorithm.