Cluster Balance
Last updated
Last updated
With the SSV token serving as the payment layer of the network, the cash flow between stakers and operators is facilitated by maintaining an SSV balance in a cluster.The cluster balance needs to be kept in check to ensure the continued operation of its validator(s) and below it is explained how to calculate the balance of a cluster at a specific blockchain block.
It is important to be aware that the cluster balance must always be higher than the required collateral for the cluster, so only the portion of the cluster balance exceeding the Liquidation Collateral can be used to calculate the Operational Runway, as shown in the picture below:
Since operator and network fees are dynamic, the required Liquidation Collateral could vary between different clusters. To calculate how much funding is needed as collateral for a cluster, please refer to the Liquidations page.
As explained in the documentation page related to Payments, the cluster balance is affected by three factors, mainly:
Network fee
Operator fees
Number of validators
And to keep track of their changes over time, the concept of Indexes have been introduced. This, in turn, means that indexes for network fees and operator fees are necessary to calculate the cluster balance, as well as the "snapshot" of the cluster status, taken the last time this was updated (the cluster snapshot is also used in smart contract transactions).
To calculate the updated cluster balance, given the cluster balance from most recent snapshot, you can use this formula:
Legend:
- cluster balance at block number n
- Change in network fees paid since the last snapshot (see below)
- Change in network fees paid since the last snapshot (see below)
- value of the cluster balance on its latest snapshot (see here)
- Validator Count, the number of validators in the cluster
Below is the formula used to calculate the network fees owed since the last cluster snapshot:
Legend:
- Change in network fees paid since the last snapshot
- Protocol Network Fee Index, the latest protocol-wide network fee index (see here)
- Block number of the latest blockchain block, for which the cluster balance needs to be calculated
- The current network fee
- The block number at which the Protocol Network Fee Index was taken
- Cluster Network Fee Index, the latest network fee index for the given cluster (see here)
Similarly, below is the formula used to calculate the operators fees owed since the last cluster snapshot:
Legend (the nomenclature designates the operator in this cluster):
- Change in network fees paid since the last snapshot
- OperatorNetwork Fee Index, the latest protocol-wide network fee index (see here)
- Block number of the latest blockchain block, for which the cluster balance needs to be calculated
- The block number at which the Operator Network Fee Index was taken
- The current operator fee, for the operator in this cluster
- Cluster Index, the latest index for the given cluster (see here)
Have a look at how to collect the necessary data to calculate the balance on the Subgraph Examples page.
A programmatic example of calculating the cluster balance has been added to the Code examples section.
Any additional funds added to the cluster balance on top of the required collateral will prolong the operation of its validators and are usually referred to as Operational Runway. Users can manage their clusters balance by depositing or withdrawing funds at will, knowing that all extra funds added to the cluster balance will increase its operational runway.
To calculate the effects of deposits and withdrawals on your cluster’s operational runway:
Legend
- Amount of $SSV in the cluster balance, exceeding the Liquidation Collateral
- the rate at which a cluster spends ( denominated in SSV tokens per block, see here).
Deposits can be made to a cluster's balance to ensure the cluster avoids liquidation and to extend its operational runway.
Withdrawals allow users to remove any excess balance they have for capital efficiency. Users may not withdraw a cluster's liquidation collateral. The collateral can only be withdrawn only when off-boarding the cluster (by removing all validators in the cluster). This means that in order to maintain a validator’s operation, a user can only withdraw in the range of their runway.