How Proof-of-Stake Works in Hx

Hybrid Network
HybridNetwork
Published in
5 min readMar 6, 2018

The Hybrid Network is a global developer community dedicated to the growth of decentralized, distributed and open source projects. There are no formal requirements to join. All you need to do is contribute. For more details check out our Hello, World_ Mission Statement.

How Proof-of-Stake works in Hx

In this article, we will be looking at how Proof-of-Stake (PoS) works in the Hx model. PoS allows for Hx holders to lock some of their Hx tokens in order to participate in governance voting as well as receive consensus rewards.

Here are some terms to familiarize yourself with before we continue:

Ticket — Allows participation in PoS and is used for decentralized consensus governance (20 new Tickets per block)

Vote — A Ticket that has been selected by a Proof-of-Work (PoW) miner from the Ticket Pool (5 Votes per block)

Ticket Price — The original cost of your purchased Ticket

Ticket Fee — The fee paid to the miner to incentivize the inclusion of your Ticket into the Ticket Pool

Ticket Pool — Total number of Tickets in the network at a given time that reside in a mempool

Stake pool — 3rd party that maintains confirmation for Tickets and Votes amongst a group of participators

Ticket Maturation — Time before your Ticket can be added to the Ticket Pool (256 blocks)

Ticket Immaturation — Time after your Ticket has Voted, missed or expired before you can purchase another Ticket (Another 256 blocks)

Ticket Window — The number of blocks before difficulty adjustment maintained by the Stake Difficulty Algorithm (Every 144 blocks or about 12 hours)

Stake Difficulty Algorithm — The method by which the network adjusts to keep Ticket prices fair and maintains the Ticket Pool size

What is the life-cycle of a Ticket (solo PoS mining)?

To receive rewards, Hx stakeholders must first start by purchasing a Ticket. Before being able to purchase a Ticket, tokens must be held in a wallet for approximately one day before eligibility. When you purchase a Ticket, the Ticket Price and a Ticket Fee are included in the transaction. The Ticket Price is fixed and everyone pays that predetermined offered rate. The size of the Ticket Fee determines your priority in being included as one of up to 20 new Tickets sold into each block. The Ticket Fee is non-refundable once your purchase of a Ticket is mined. After 256 blocks, the Ticket matures and it is then added to a Ticket Pool, where it is eligible to selected for Voting. Tickets are selected at random from the Ticket Pool to be cast as Votes. If you are solo mining, you must keep the desktop wallet running for the system to verify your claim of your purchased Ticket AND when your Vote has been cast. You have a 2-block window for your Vote to be mined into a block. The stakeholder receives a small reward, as well as the original Ticket Price, when the Vote is included in a newly mined block. Time frames range around 28 days on average before a Ticket is selected as a Vote. This is based on Poisson distribution, which states at an average of 28 days, there is a 50% chance that your Vote has already been chosen. At a maximum, this could take up to 142 days, with a .5% chance of the Ticket expiring before being picked. If your Ticket is missed or expires, the original Ticket Price is returned without any additional reward. Whether your Ticket has been used for Voting, missed or expired, you must wait another 256 blocks before purchasing another Ticket during a period of Immaturation. During this time these funds (rewards and/ or the original Ticket Price) are not spendable till after 256 blocks have passed. Solo PoS mining as detailed above requires your desktop wallet to be running without interruption throughout the Ticket life-cycle.

Miners are penalized in the form of reduced block rewards for including less than 5 Votes per block. This penalty is what incentivizes miners to include broadcasted Votes selected from the Ticket Pool. Another parameter used to ensure fairness in the system is the maximum Ticket Pool size for the network is maintained through the network’s Stake Difficulty Algorithm and is re-calculated every 144 blocks, or about 12 hours.

If you are Voting as an individual (PoS solo mining), you must keep your desktop wallet running. This cannot be stressed enough because if your wallet is not running, you may miss the opportunity for the network to validate your Ticket when it is added to the Ticket Pool AND when your Ticket is selected to Vote. If your desktop wallet is not running your Ticket may become expired and you will lose your ability to earn the staking reward. The wallet will automatically revoke your Ticket if it is missed or has expired. In this scenario your Ticket Price is automatically refunded, but your Ticket Fee is not.

How do Stakepools work? How do they benefit me?

As a solution to this, users may choose to enter a Stakepool, so that they do not have to worry about keeping their wallets running 24/7. This allows greater participation and decentralization, resulting in a more stability for the project.

Stakepools are built into the protocol and pose little centralization risk as you do not hand over control of your staking coins in the pool. Stakepools have pre-determined fees for the service they provide to pay overhead costs such as running servers. This allows stakeholders to purchase Tickets without the concern of being available online to claim your Ticket. By participating in a Stakepool, you do delegate your right to Vote to the Stakepool. It is recommended that Stakepools support Voting preferences. The Stakepool does not have access to your funds and does not lay claim to your rewards. When you buy the original Ticket, your purchase includes a commitment to go to your own reward address. The Voting reward is then allocated by the protocol according to the terms of the Ticket. There is no way for the Stakepool to gain access to any portion of the reward that isn’t agreed to at the time of the Ticket purchase.

If you have any technical questions, or would to to contribute, please join the Hybrid Network!

--

--