The HCASH development team have implemented the Blake256 mining algorithm, along with an advanced voting mechanism — a practical and flexible PoS solution on the HyperCash mainchain, with optimised rules.
To put it simply, logic in a hybrid consensus mechanism works by PoW miners creating blocks, and PoS miners confirming the validity of these blocks.
The rules for PoW and PoS mining rewards on the HC chain are as follows:
Each block mined on the HC main chain contains a 6.4HC reward (decreasing with time), which consists of 3.84HC (60% of the total) allocated to PoW mining, 1.92HC (30%) for PoS mining, and the remaining 10% for developers. Five tickets will also be selected for each block generated, and each ticket will be awarded 0.384HC.
In order to participate in PoS mining, hcGUI users need to purchase tickets using HC. The total cost consists of the ticket price and ticket fees. Fees are paid to PoW miners, who will place new tickets into newly mined blocks.
*HC used to purchase tickets will be locked and cannot be withdrawn until that round of voting has passed.
Purchased tickets are not valid until they are included into a block by PoW miners. If tickets are not yet included into a block, they remain in the mempool. The higher the ticket fee paid by the user, the higher chance the ticket will be selected by PoW miners to be included in a block. Since there is a limit to how many tickets a new block can contain (maximum 20 tickets per block), there is competition between ticket holders.
*It can take up to, however, normally significantly less than 71 days before tickets in the mempool are selected by PoW miners. If they are not selected within 71 days, both the ticket price and ticket fee are returned to the user’s hcGUI wallet account.
Tickets that are selected and included into a block are called immature tickets. It takes some time before immature tickets become mature tickets. Only mature tickets can enter the ticket pool.
*Immature tickets need 512 block confirmations (approximately 21.33 hours) to become mature tickets.
All mature tickets are placed in a ticket pool. A ticket price adjustment is made every 288 blocks, and the total number of votes in the ticket pool is capped at 40,960.
After entering the ticket pool, all tickets are waiting to be randomly selected by the system to become vote tickets. Users can cast a vote with one vote ticket, and then claim their block reward. The price of the initial ticket/s will be returned to the user’s hcGUI account after the corresponding vote has been cast (ticket fees will not be returned).
* The selection process is subject to a Poisson distribution function. Put simply, the probability of being selected within 28 days is 50%, and the probability of being selected within 142 days is 99.5%. If not selected within 142 days, the ticket price will be refunded, and the ticket fee will not, as it will have been paid to a miner for verification.
* The ticket price and PoS reward will be transferred to users’ hcGUI account in 21.33 hours (512 block confirmation) after the corresponding vote is cast.
* Solo PoS miners need to keep their hcGUI wallets online when the system is calling for a vote, otherwise the vote cannot be carried out. If users do not wish to keep wallets online constantly, they can delegate stake pools to vote on their behalf. Stake pools will charge users a commission.
Normally, HC tokens used to purchase a ticket will be locked and cannot be withdrawn until that round of voting has passed. However, in the case of tickets missing a voting round, users can proceed with a ticket revocation transaction, and get the cost of their ticket back.
Missing a voting round can apply in two cases:
- The ticket is selected, but the wallet is not able to cast a vote (the wallet is offline);
- The ticket is not selected by PoW miners after 40,960 blocks.
If the system determines that a user has missed a voting round, the wallet will automatically return the locked ticket price. If the ticket fee has already been paid to PoW miners for including the ticket into a block, it will not be returned.