Skip to main content

SSVNetworkViews

The SSVNetworkViews contract is for reading information about the network and its participants.

SSV Views Contracts Repository

General Methods

getNetworkFee ()

Description: Returns current network fee.

Return values:

ParameterTypeDescription
feeuint256The fee charged by the network (denominated as $SSV tokens per block)

getNetworkEarnings ()

Description: Returns accumulated network fees not yet withdrawn.

Return values:

ParameterTypeDescription
amountuint256Amount of fees accumulated in the network treasury

getLiquidationThresholdPeriod ()

Description: Returns the minimum duration (in blocks) which a cluster has to have sufficient balance (liquidation collateral) to not be liquidated.

Return values

ParameterTypeDescription
blocksuint64The minimum duration (blocks) which a cluster has to have sufficient balance (liquidation collateral) to not be liquidated.

getMinimumLiquidationCollateral()

Description: Returns the minimum amount which a cluster has to have sufficient balance (liquidation collateral) to not be liquidated.

Return values

ParameterTypeDescription
amountuint256The minimum amount of SSV which a cluster has to have (liquidation collateral) to not be liquidated.

getOperatorFeeIncreaseLimit()

Description: Returns the max amount by which operators can increase fees in each fee update cycle. This does refer to the max operator fee limitation, but to the rate (%) by which it can be increased.

Return values

ParameterTypeDescription
amountuint64The maximum increase in percentage the operator can update his fee to.

getOperatorFeePeriods()

Description: returns the time windows (in seconds) of operators declaration and execution fee periods.

Return values:

ParameterTypeDescription
secondsuint64The duration (seconds) until an operator can execute a fee after declaring it
secondsuint64The duration (seconds) until an operator can execute a fee after declaring it

getMaximumOperatorFee()

Description: Gets the operator maximum fee for operators that use SSV token

Return values

ParameterTypeDescription
maxFeeuint64The maximum fee value (SSV/year)

getValidatorsPerOperatorLimit()

Description: Returns the maximum amount of validators an operator may manage.

Return values

ParameterTypeDescription
Validator limituint32amount of validators an operator may manage.

Operator Methods

getOperatorById (operatorId)

Description: Returns operator's data.

ParameterTypeDescription
operatorIduint64The operator id

Return values:

ParameterTypeDescription
owneraddressThe operator's admin address (for management purposes)
feeuint64256The fee charged by the operator (denominated as $SSV tokens per block)
validatorCountuint32The amount of managed validators
whitelistedContractaddressThe external contract set to manage this operator's whitelisted addresses
isPrivatebooleanIndication if operator is permissioned
activebooleanOperator network status

getOperatorFee (operatorId)

Description: returns current operator's fee (not declared).

ParameterTypeDescription
operatorIduint64The operator id

Return values

ParameterTypeDescription
declaredFeeuint256The fee charged by the operator (denominated as $SSV tokens per block)

getOperatorDeclaredFee (operatorId)

Description: Returns the declared fee (not actual fee) together with the execution time window.

ParameterTypeDescription
operatorIduint64The operator id

Return valuegetOperatorEarnings (operatorId)

Description: Returns the outstanding earnings of an operator.

ParameterTypeDescription
operatorIduint64The operator id

Return values

ParameterTypeDescription
balanceuint256Operators outstanding earnings in $SSV tokens.

Cluster Methods

getBalance (owner, operatorIds, cluster)

Description: Returns the outstanding SSV balance of a cluster.

ParameterTypeDescription
owneraddressThe cluster owner address
operatorIdsuint64[]List of cluster operators Ids
clustertuple[]Object containing the latest cluster snapshot data - obtained using the SSV Scanner tool

Return values:

ParameterTypeDescription
balanceuint256Clusters outstanding balance denominated in $SSV tokens

getBurnRate (owner, operatorIds, cluster)

Description: Returns current ongoing expenses of SSV tokens for a particular SSV cluster balance on per block basis (aggregates all expenses for all the validators in this cluster).\

ParameterTypeDescription
owneraddressThe user address
operatorIdsuint64[]List of cluster operators Ids.
clustertuple[]Object containing the latest cluster snapshot data - obtained using the SSV Scanner tool.

Return values

ParameterTypeDescription
burnRateuint256The rate per block in which the account spends SSV.

Liquidator Methods

isLiquidatable (owner, operatorIds, cluster)

Description: Returns true if the specified cluster is under the liquidation threshold and can be liquidated.\

ParameterTypeDescription
owneraddressThe user address
operatorIdsuint64[]List of cluster operators Ids.
clustertuple[]Object containing the latest cluster snapshot data - obtained using the SSV Scanner tool.

Return values

ParameterTypeDescription
isLiquidatablebooleanIndication if a cluster could be liquidated

isLiquidated (owner, operatorIds, cluster)

Description: Returns true if the provided cluster is liquidated.

ParameterTypeDescription
owneraddressThe user address
operatorIdsuint64[]List of cluster operators Ids.
clustertuple[]Object containing the latest cluster snapshot data - obtained using the SSV Scanner tool.

Return values

ParameterTypeDescription
isLiquidatedbooleanIndication if a cluster is liquidated

getWhitelistedOperators(operatorIds, whitelistedAddress)

Description: Returns a list of operators that have this address whitelisted for them.

ParameterTypeDescription
operatorIdsuint64[]List of operators Ids.
whitelistedAddressaddressETH1 address

Return values

ParameterTypeDescription
whitelistedOperatorIdsuint64[]List of operator IDs that this address is whitelisted for.

isWhitelistingContract(contractAddress)

Description: Returns if a contract address is a valid whitelisting contract or not.

ParameterTypeDescription
whitelistedAddressaddressWhitelisting contract address.

Return values

ParameterTypeDescription
isWhitelistingContractboolTrue if contract is valid, false if not.

isAddressWhitelistedInWhitelistingContract(addressToCheck, operatorId, whitelistingContract)

Description: Checks the whitelisted contract for an operator to see if the address provided is whitelisted for the given operator.

ParameterTypeDescription
addressToCheckaddressAddress we want to check is whitelisted.
operatorIduint256Operator ID.
whitelistedAddressaddressWhitelisting contract address.

Return values

ParameterTypeDescription
isWhitelistedboolTrue if address is whitelisted, false if not.