

In May of this year, we published the initial design of Harmony’s auction-based staking mechanism. Since then, we have received feedback and suggestions from various parties, including staking-as-a-service (staking-as-a-service) companies, individual validators, and the founder of Ethereum, Vitalik. We take these feedback seriously, including the operational burden caused by frequent bidding, and the excessively high requirement of continuously validating for 7 epochs (7 days). Additionally, there are some unresolved issues with this design, such as how to support (token) delegation and how to implement block reward compounding in a shard-based blockchain. Through this article, we discuss the design idea of the PoS system and grandly introduce Harmony’s latest mortgage mechanism-proof of valid mortgagesecondary title
How to choose a validator
At present, most PoS blockchains have the concept of the so-called "committee", which is a group of verifiers who have the right to generate and verify blocks (according to the specific blockchain, they are also called block creators, super nodes, etc.). Usually, the number of seats on the committee is limited (e.g. 21 for EOS, 100 for Cosmos). The so-called validator election problem is basically what mechanism determines who gets a seat on the committee. In theory, this is analogous to the economic problem of how to allocate finite resources in the real world. In economics, ways of allocating finite resources can be (but are not limited to):
1) By pricing or bidding, which means that the highest price gets it;
2) According to social standards, such as social status and reputation;
3) How much is consumed according to time, such as queuing up for registration, distributing benefits according to seniority, etc.;
4) by random selection, such as lottery tickets, car purchases by lottery, etc.;
In fact, the method of selecting validators in the committee is solved by similar means. Let's take a look at some common methods in existing PoS:
The first:According to the number of staked tokens(Cosmos, Polkadot): In this model, the validators with the highest stakes get a limited number of seats. This is very similar to bidding in the real world. Our original bid-based design also falls into this category.
The second type:Choose randomly among all stakers(Ethereum 2.0, Tezos): This model has specific minimum requirements for potential validators to stake. For example, Ethereum 2.0 requires a minimum of 32 ETH and Tezos requires 8,000 XTZ to be eligible to be randomly selected into the committee. The model is basically a combination of pricing and random selection.
The third type:by social reputation and voting(EOS, Tron): In EOS, the limited 21 block producers are determined by the number of votes validators get from token holders, this social reputation-like measure is a standard that exists off-chain.
timetimeThere are also factors. For example, Peercoin uses the time of holding coins (as well as the number of coins held and a certain degree of randomness) to determine who has the right to produce blocks.
secondary title
How to distribute block rewards
Usually, for each successfully confirmed block, the PoS system distributes block rewards to validators to motivate them to participate in the consensus. In most existing PoS blockchains, validators will receive block rewards proportional to the amount they stake. This design suffers from the "rich get richer" problem, which ultimately leads to an overly concentrated staked token. For example, of the 100 validators in Cosmos at the time of writing,Top 10 validatorsHold more than 50% of staked tokens.
Another option that could alleviate this problem is to give all validators the same amount of block rewards regardless of how much they staked - this is also the idea we came up with in our original bid-based staking design (a similar idea is also The basis of Polkadot's staking model NPoS). Giving equal rewards encourages validators to distribute staked tokens evenly, as stakers who stake more will have a lower rate of return than stakers who stake less. Nonetheless, large token holders can still participate in PoS as multiple stakers by splitting their staked tokens. So the problem of "the rich getting richer" is not completely solved, but only alleviated in a certain sense.
In addition to the design factors discussed above, other more realistic factors are also critical to creating a validator-friendly staking economy. Compounding interest on block rewards is an important way for validators to maximize their rewards. In this regard, a design that provides the same reward cannot support compound interest, because if the validator adds the new block reward to the stake again, it will not generate more rewards. Additionally, support for token delegation has been a standard requirement for PoS blockchains, as it allows ordinary token holders to stake and earn rewards without the need to run a validator node. Our previous bidding-based preliminary mortgage mechanism design is not suitable for token delegation, because bidding is an uncertain behavior, and it is inevitable that the delegator's tokens will be used improperly or insufficiently during the bidding process.
For Harmony's sharding system design, there is a specific design constraint: for each shard, its mortgage amount is only one-Nth of the entire system (N is the number of shards), and it needs to contain a large number of Validators with equal rights (number of stakes) to spread the power of big players in the shards (see our technical white paper for more details). Otherwise, a single shard can be easily attacked by a validator with a large number of staked coins (i.e. 1% attack).
In summary, our design goals are as follows:
● The amount of staked tokens among validators needs to be evenly distributed (to avoid centralization of stakes)
● Support simple and detailed delegation mechanism
secondary title
EPOS mechanism prevents mortgage centralization
Harmony's mortgage proof mechanism EPoS (Effective Proof-of-Stake), which is an efficient mortgage mechanism, can avoid the centralization of mortgage tokens, while still supporting mortgage compound interest and token delegation, suitable for verification that requires a large number of equal rights sharding system.
verifier selection
In EPoS, we will select validators based on the ranking of stakers' tokens. Specifically, for each epoch (about 1 day), the top 1600 stakers will get a limited 1600 validator seats (4 shards * 400 seats). When the epoch evolves, the new mortgage ranking will determine who will be the validator for the next epoch.
Block Rewards Based on Effective Mortgage
As mentioned above, neither the block reward mechanism according to the mortgage ratio nor the block reward mechanism that treats all people equally cannot fully meet our design goals (including the even distribution of mortgage and the problem of mortgage compound interest). In EPoS, the verifier's block rewards are not distributed according to its actual mortgage amount, but according to the proportion of its "effective mortgage amount". The consensus definition of effective mortgage amount is as follows. We use median_stake to represent the median stake of the top 1600 stakers, and actual_stake to be the actual stake held by each validator.

Here, c is a protocol parameter (eg, c = 0.15). The validator's effective stake is essentially its actual stake limited by the upper threshold (1 + c) * median_stake and the lower threshold (1-c) * median_stake.
image description

The actual mortgage amount curve and effective mortgage amount of the top 1600 validators
With the introduction of effective staking, higher-ranked validators are effectively penalized financially for staking too many tokens, while lower-ranked validators enjoy additional rewards. Effective staking acts as an equalizer, pushing for a more even distribution of staked tokens among validators, avoiding centralization.
In order to achieve compound interest, validators in the blue and green zones can directly obtain compound interest by repeatedly staking block rewards in the same validator node, while validators in the yellow zone can only obtain it by starting a new validator node More block rewards. For mining pools that hold a large number of tokens, this design forces itself to be decentralized to avoid a single point of failure.
In addition, EPoS can support intuitive and efficient token delegation, where token holders can delegate tokens to one or more validators based on the validator’s commission rate, uptime, and their position in the ranking. After deducting the commission fee set by the validator, the block reward will be distributed to delegators in proportion to the delegated tokens. For delegators, delegating to verifiers in the green field will get higher returns economically, which can also effectively prevent a large number of tokens from being delegated to head verifiers and avoid centralization of mortgages.
These designs of EPoS fully realize the design goal of avoiding the decentralization of mortgages while supporting delegation and mortgage compound interest.
collateral reduction mechanism
For dual signature
● Cut at least 2%mortgage tokens. The number of concurrent slashes will scale linearly with the number of validators being slashed at the same time (e.g.,If a third of validators double-sign, the slash rises to 33% for each)
● It is worth mentioning that this slashing rule complements the decentralization effect of the previous effective mortgage mechanism on the large households themselves. If multiple mortgager nodes of the large households launch attacks at the same time, their mortgaged tokens will also be severely reduced .
For nodes not online
● Every three hours offline, validators’ voting rights will beleak 25%, Leakage means that some tokens are forcibly removed from the mortgage without losing ownership, which is different from reduction.
● After being offline for 12 consecutive hours, the verifier willandandinto stagnation。Stalled validators will receive a 0.1% token slash penalty. If the validator comes online again, its voting rights will be restored.
● For those validators who are stalled, they will not be considered in the next validator election. They can send"Request to join" transactionat last
at last
The mortgage mechanism and incentive model are the core components of the PoS blockchain. In a way, they are as important as blockchain protocols. Information about the staking mechanism and incentive models of current PoS blockchains is scattered in many places, and it is difficult to clearly understand the differences and specifics of these systems. In this regard, we have summarized a comparative chart of the staking and incentive mechanisms of several mainstream PoS projects, which also includes more details on Harmony's staking workflow.
Finally, for staking validators who want to try out the EPoS mechanism before mainnet, welcome to our Pangaea game, a game with an incentivized model on the Harmony testnet. The feedback you put forward in Pangea will help to further optimize the design of EPoS and prepare for the mainnet.