Bifrost Risk Control Series #02 Introduction to Ethereum 2.0 and Polkadot’s Slash Rules
PoS must have a built-in Slash mechanism
The current public chain design can be roughly divided into PoW (Proof of Work) and PoS (Proof of Stake), and the PoW+PoS hybrid consensus is a combination of the two. The typical public chains that adopt PoW consensus are Bitcoin and Ethereum 1.0. Usual public chains that adopt PoS consensus are Ethereum 2.0 and Polkadot. In public chains that adopt PoW consensus, there are few node penalty mechanisms (Slash) designed, and public chains that adopt PoS will inevitably develop various Slash rules embedded. This is because the PoW public chain nodes (miners) have to pay the cost of computing power and energy consumption when producing blocks, while the nodes of the PoS public chain (validators) have the production cost to produce blocks. Negligible, the highest cost is the opportunity cost of losing liquidity after purchasing a certain number of public chain tokens for staking. While PoW and PoS both need to pay for the cost of running a continuously online host node, the difference is not significant.
When the production block needs to pay a non-negligible cost, the possibility of the node forging the block is significantly reduced, so the PoW public chain does not need to design a Slash mechanism. While the cost of producing blocks by nodes of the PoS public chain is negligible, it is easy to forge blocks and cause severe damage to the effective consensus of the entire system. Therefore, it is necessary to design a Slash mechanism to punish this malicious behavior. PoS public chains’ typical problems are Nothing-At-Stake and Long-Range-Attack, which are solved by the Slash mechanism.
Also, from system design and implementation, PoS public chains are usually much more complicated than PoW public chains. For example, to ensure PoS public chains’ availability and reach an actual end state for the ledger’s state, a sufficient number of nodes are required to stay online. Therefore, it is necessary to design a corresponding Slash mechanism to punish the node going offline. The PoW public chain only needs to reach the ledger’s final state in probability, and there is no staking principal mortgage as the entry barrier for the production block. The mining difficulty adjustment mechanism is designed, so there is no need to worry about the system’s availability. There will be nodes. Driven by profits, stay online and provide block production services.
Staking and Slash mechanism of Ethereum 2.0
The PoS consensus algorithm was adopted by Ethereum 2.0 in Casper. The current specific implementation is sending 32 ETH to the official deposit contract in Ethereum 1.0 and then activating and running the validator node. Ethereum 2.0 adopts sharding and can support the online operations of hundreds of thousands to millions of nodes. It is currently under development and has not yet achieved the complete design goal. The Slash rules are more complicated. The presently known Slash execution penalty conditions are:
- Propose two or more conflicting blocks in the same slot
- Vote for two or more conflicting blocks in the same slot
- Current voting behavior and historical voting behavior conflict with each other
- Node is offline (network interruption, system downtime)
Points 1 and 2 mainly correspond to the Nothing-At-Stake problem, and point 3 corresponds to the Long-Range-Attack problem. The penalties corresponding to the first three points are relatively large. You should run the officially recognized standard protocol client software and avoid running multiple nodes with the same session key simultaneously.
The penalty corresponding to point 4 is relatively small. As long as the node stays online occupies more than ⅔, it can still get a positive profit, and there is no need to worry too much about the node being offline. The initial mortgage amount for running a validator node is 32 ETH. During the execution of the fine, if the remaining amount is equal to or lower than 16 ETH, a forced withdrawal mechanism will be triggered. For a more detailed description of Slash rules:
Polkadot’s Staking and Slash mechanism
Polkadot has carried out a modular decomposition of the consensus algorithm, adopting NPoS+BABE+GRANDPA to reach a system consensus. NPoS is the node election algorithm, BABE is the block generation algorithm, and GRANDPA is the state termination algorithm. NPoS (Nominated Proof-of-Stake) mechanism is designed with two types of roles: validator and nominator. Any currency holder can become a nominator and participate in the election of validator, and the order of magnitude of a validator is hundreds or thousands.
The validator may be fined by Slash for offline, forged PoV of parachains, voting for incorrect blocks, and simultaneous voting to confirm different blocks of the same height. The amount of the Slash fine is proportional to the staking mortgage obtained by the validator. The more the mortgage amount, the greater the absolute amount corresponding to the penalty. Nominator needs to comprehensively consider various factors such as income distribution, node operator popularity, credibility, and punishment, and then select an appropriate validator for Nominating/Staking.
Polkadot has designed four types of Slash rules based on system security considerations:
Lv1: Low-security threat, 0.1% fine or forced withdrawal
Lv2: This is not malicious, but due to improper behavior caused by bad behavior, a fine is set of 1%
Lv3: Malicious or accidental misbehavior, but will not cause serious security risks and waste of resources, fined 10%
Lv4: poses a severe security risk to the operation of the system. A large number of validators collude with each other, forcing the system to consume a lot of resources, and a fine of 100%
For a more detailed description of Slash rules, please refer to this article:
Slash mechanism’s impact on Bifrost
As mentioned above, the block production cost of the PoS public chain is mainly reflected in the opportunity cost of staking the principal during the pledge period and the possible Slash risk. Bifrost’s core design goal is to allow users to obtain staking derivatives when performing staking, release liquidity, and help users reduce opportunity costs. Since the PoS public chain must have a built-in Slash mechanism, Bifrost needs to carefully analyze the various Slash risks corresponding to different public chains and provide corresponding risk prevention and control measures to ensure the platform’s security allows users to invest in the principal token.
The vToken can maximize positive returns and prevent attackers from deliberately performing malicious actions after buying the voting rights of tokens to trigger PoS public chain comparisons. The high-level Slash penalty mechanism causes a severe loss of staking principal. We will give the design details of Bifrost’s various levels of risk prevention and control measures in a follow-up article.
What is Bifrost ?
Bifrost is a Polkadot Ecosystem DeFi infrastructure protocol that aims to become an infrastructure for providing Staking liquidity, and currently offers a derivative vToken for Staking and Polkadot Lease Offering (PLO). It is also a member of the Substrate Builders Program and Web3 Bootcamp. vToken can optimise transactions in multiple scenarios such as DeFi, DApp, DEX and CEX.
vToken can optimise transactions in multiple scenarios such as DeFi, DApp, DEX and CEX. vToken can be used to realise the transfer channel of governance right such as Staking and PLO to hedge the risk of Staking assets. In extended scenarios such as when vToken is used as collateral for lending, the staking proceeds can offset part of the interest and realise low-interest lending.