Hedera Technical Insights: Proxy Staking on Hedera
1516208829798
Jun 27, 2019
by Paul Madsen
Head of Identity, The HBAR Foundation

Note: this article describes the proxy staking mechanism in Hedera. Proxy staking will not be supported at Open Access.

The votes of Hedera nodes in the virtual voting algorithm are weighted by the stake of that node, that is, the amount of tokens in the accounts that the nodes have designated as staked. Weighting the votes by the stake of the corresponding node serves to mitigate Sybil attacks because, while an attacker will eventually (after we transition to a permissionless model) be able to create thousands of nodes under their control, these malicious nodes will only have a combined influence equal to the hbar balance of the attacker - this necessarily divided amongst the Sybil nodes. Should an attacker attempt to buy up enough tokens to expand their stake, and so influence towards consensus, the expectation is that the price of the tokens will increase, making the attack more and more expensive.

The fact that hashgraph is asynchronous Byzantine Fault Tolerant (ABFT) means that as long as an attacker has less than 1/3 of the total stake, they will be unable to either stop consensus from proceeding, or cause an inconsistent consensus, or inappropriately skew the consensus order and consensus timestamps that hashgraph delivers. The more honest actors that commit their tokens as stake, the more secure the overall security of the network will be - as honest stake raises the bar for a malicious actor to be able to reach the 1/3 threshold.

Some other Proof of Stake models rely on ‘slashing’ where stake is effectively a bond on a participant’s good behaviour. Bad behaviour results in the stake being lost, or slashed. Even if not lost to slashing, there is a loss of liquidity of the staked coins, because they are frozen while they are bonded. Hedera’s stake model has no bonding or slashing. A Hedera node (or an account as explained below) is never punished with a fine, and can spend the tokens they have in a staked account at any time, though their influence towards consensus and consequent reward, will decrease accordingly. The staked tokens are perfectly safe and liquid.

Anybody with tokens will be an account holder. While we hope that many of these will choose to run nodes, the expectation is that there will be far more account holders that choose not to. Proxy staking is a mechanism whereby the tokens held by account holders who are not running a node can also be staked towards consensus, albeit indirectly through a node. Account holders not running nodes can proxy their stake to a node such that this stake increases the weight of that node’s votes towards consensus.

As for the nodes, the hbars that an account holder chooses to proxy to a node as stake remain fully under the control of the account holder. They are never lost or fined. They are never locked up. At any time, they can spend the tokens, remove the proxy, or switch the proxy to a different node.

Stake Mechanisms

Account holders proxy to a node by specifying a ProxyAccountID parameter when creating or updating an account that specifies the target node’s account. The network comes to consensus on this transaction and nodes update the state accordingly, recording the proxying relationship between the account holder and the node.

If an account does not stipulate a particular node account, then node software will assign the account’s stake automatically but the account will not receive any corresponding payment. The goal is to encourage people (either users or wallet makers) to be motivated to choose a reliable proxy target.

All nodes have a consistent copy of this stake data (how much combined stake a given node has and the accounts that have proxied their stake to that node), and use it in weighting the votes (and contribution to the median) of the nodes in the calculation of the consensus timestamps. Additionally, the amount of the stake is used when calculating payments to the nodes and account holders.

Staking Payments

To encourage nodes to put forward stake, nodes are compensated for their contribution to consensus proportional to the stake they have put forward. At the end of every 24 hour cycle, nodes who have met a participation threshold (for instance created witnesses in 90% of rounds) will automatically receive a payment from the Hedera treasury account.

Just as nodes are compensated for their contribution to consensus, account holders are encouraged to proxy their stake to a node through regular payments sent directly to that account. Again, as for the node itself, the payments different accounts receive will be proportional to the amount of stake they proxied to the node. Nodes will receive significant payment amounts, to compensate for running the node, while proxy stakers will receive only a tiny amount, for their small effort.

The stake in any accounts that have not stipulated a proxy account are allocated automatically but without any associated proxy payment.

Unlike other staking models, Hedera’s proxy staking creates no risk of the loss of hbars, nor any loss of liquidity, as discussed above. Consequently, with payments not needing to compensate for such risks, the associated proxy payment is not expected to be a significant percentage. It takes only the slightest amount of effort to find good nodes for proxying, so the payments will be very close to zero. But a tiny amount is paid in order to encourage people (or the builders of their wallet software) to do the tiny amount of effort. This tiny amount is shared equally between the proxy staker and the node, which is further encouragement for nodes to be reliable, so that people will choose them.

Summary

In a stake-based DLT, the more widely distributed the stake is then the more secure the network will be, as wide distribution makes impractical any small number of parties aggregating sufficient stake to exert undue influence. Proxy staking in Hedera hashgraph will allow the stake of millions of account holders to be used towards consensus even if not directly participating as a node. Nodes will receive significant compensation for staking, to incentivize them to do all the effort of being a node. Proxy stakers will also receive very small amounts in order to incentivize them to do the small amount of effort of choosing reliable nodes to which they can proxy stake.