Feature | Validator Subnetwork | Gateway Subnetwork |
---|---|---|
Duties | Basic block proposal | Preconfirmation tasks |
Rewards | Shared with Gateway Subnetwork | Shared with Validator Subnetwork |
Slashing Conditions | Accepting blocks from non-opt in relays | Reneging on preconfirmation commitments |
The SymbioticNetworkMiddleware
implements several key Symbiotic Primitive through Symbiotic Middleware SDK:
KeyManagerBLS
- Manages storage and validation of operator keys using BLS signaturesEpochCapture
- A middleware extension that captures timestamps based on epochsEqualStakePower
- Implementation of a 1:1 stake to voting power conversionOzAccessManaged
- A middleware extension that integrates OpenZeppelin’s AccessManaged for access controlBaseOperators
- Base contract for managing operator registration, keys, and vault relationshipsSubnetworks
- Contract for managing subnetworks that can be registered and controlledinitialize
Initializes the contract with required parameters and sets up subnetworks.
Parameters:
Name | Type | Description |
---|---|---|
network | address | The address of the network |
slashingWindow | uint48 | The duration of the slashing window |
vaultRegistry | address | The address of the vault registry |
operatorRegistry | address | The address of the operator registry |
operatorNetOptIn | address | The address of the operator network opt-in service |
reader | address | The address of the reader contract used for delegatecall |
owner | address | The address of the contract owner |
_proposerRegistry | address | The address of the proposer registry contract |
registerOperator
Registers a new operator with the specified key, vault, and subnetwork.
Parameters:
Name | Type | Description |
---|---|---|
key | bytes | The BLS public key of the operator |
vault | address | The vault address associated with the operator |
signature | bytes | The signature proving ownership of the BLS key |
subnetwork | uint96 | The subnetwork identifier (VALIDATOR_SUBNETWORK or GATEWAY_SUBNETWORK) |
unregisterOperator
Unregisters the calling operator from the system.
unpauseOperator
Unpauses the calling operator’s operations.
registerOperatorVault
Registers a vault for the calling operator.
Parameters:
Name | Type | Description |
---|---|---|
vault | address | The address of the vault to register |
unregisterOperatorVault
Unregisters a vault for the calling operator.
Parameters:
Name | Type | Description |
---|---|---|
vault | address | The address of the vault to unregister |
pauseOperatorVault
Pauses the operations of a vault for the calling operator.
Parameters:
Name | Type | Description |
---|---|---|
vault | address | The address of the vault to pause |
unpauseOperatorVault
Unpauses the operations of a vault for the calling operator.
Parameters:
Name | Type | Description |
---|---|---|
vault | address | The address of the vault to unpause |
slash
Slashes an operator’s stake across their active vaults. The slashing amount is distributed proportionally across the operator’s vaults based on their relative stake amounts. The function:
For example, if an operator has:
And a slash amount of 101 ETH is imposed:
Due to integer division and rounding, the actual amounts would be:
If the slash amount was 51 ETH instead, the extra 1 ETH “dust” from rounding would go to the final vault (Vault C), making its slash 6 ETH.
Parameters:
Name | Type | Description |
---|---|---|
params | SlashParams | The parameters for the slash operation including key, timestamp, subnetwork, amount and hints |
activeOperatorsAt
Retrieves the list of active operators at a specific timestamp.
Parameters:
Name | Type | Description |
---|---|---|
timestamp | uint48 | The timestamp to query active operators |
isOperatorRegistered
Checks if an operator is registered in the system.
Parameters:
Name | Type | Description |
---|---|---|
operator | address | The address of the operator to check |
activeOperatorVaults
Gets the list of active vaults for a specific operator.
Name | Type | Description |
---|---|---|
operator | address | The address of the operator to check |
activeOperatorVaultsAt
Gets the list of active vaults for a specific operator at a specific timestamp.
Parameters:
Name | Type | Description |
---|---|---|
timestamp | uint48 | The timestamp to query active vaults |
operator | address | The address of the operator to check |
activeVaults
Gets the list of all active vaults.
activeVaultsAt
Gets the list of active vaults at a specific timestamp.
Parameters:
Name | Type | Description |
---|---|---|
timestamp | uint48 | The timestamp to query active vaults |
getOperatorPower
Gets the power of an operator for a specific vault and subnetwork.
Parameters:
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
vault | address | The address of the vault |
subnetwork | uint96 | The subnetwork identifier |
Gets the power of an operator for a specific vault and subnetwork at a specific timestamp. Parameters:
Name | Type | Description |
---|---|---|
timestamp | uint48 | The timestamp to query operator power |
operator | address | The address of the operator |
vault | address | The address of the vault |
subnetwork | uint96 | The subnetwork identifier |
Gets the total power of all operators in the system.
getOperatorCollaterals
Retrieves the collateral tokens and their staked quantities for a given operator’s active vaults.
Parameters:
Name | Type | Description |
---|---|---|
operator | address | Address of the operator whose collateral stakes will be queried |