Slashing
Slashing is a penalty mechanism that deters operators from breaking their commitments. Violations include failing to complete tasks properly or accurately. Slashing typically burns or redistributes the operator's staked funds.
Slasher Module
Each Symbiotic Vault has an immutably set Slasher module implementation. There are three possible implementation choices:
-
No Slasher - no slashing can occur within the Vault
-
Instant Slasher (
TYPE = 0) - allows networks to immediately slash funds in a FIFO order -
Veto Slasher (
TYPE = 1) - supports a veto process over a pre-defined veto period, where designated Resolvers can cancel the slashing request
Each Slasher module contains a slashableStake(subnetwork, operator, captureTimestamp, hints) function that returns the amount of collateral still slashable for the given captureTimestamp at the current moment.
Slashing Guarantees
Each Symbiotic Vault has an epoch duration (obtained via Vault.epochDuration()), which determines the withdrawal delay and provides a period during which slashing guarantees are held.
The following inequality must hold:
executeSlashTimestamp - captureTimestamp <= epochDurationSlasher (Type 0)
The slasher instantly executes slashing requests when received and validated.
import {IVault} from "@symbioticfi/core/src/interfaces/vault/IVault.sol";
import {ISlasher} from "@symbioticfi/core/src/interfaces/slasher/ISlasher.sol";
import {Subnetwork} from "@symbioticfi/core/src/contracts/libraries/Subnetwork.sol";
address slasher = IVault(vault).slasher();
bytes32 subnetwork = Subnetwork.subnetwork(NETWORK, IDENTIFIER);
ISlasher(slasher).slash(
subnetwork,
operator,
amount,
captureTimestamp,
hints
)Parameters:
subnetwork- full identifier of the subnetwork (address of the network concatenated with the uint96 identifier)operator- address of the operatoramount- amount of the collateral to slashcaptureTimestamp- time point when the stake was capturedhints- hints for checkpoints' indexes
VetoSlasher (Type 1)
The flow consists of three stages:
- Request Slashing
- Veto Slashing
- Execute Slashing (if not vetoed)
Let’s assume the veto duration period is set to 5 days and the epoch duration is set to 7 days.
Day 1 - Request Slashing
import {IVault} from "@symbioticfi/core/src/interfaces/vault/IVault.sol";
import {IVetoSlasher} from "@symbioticfi/core/src/interfaces/slasher/IVetoSlasher.sol";
import {Subnetwork} from "@symbioticfi/core/src/contracts/libraries/Subnetwork.sol";
address slasher = IVault(vault).slasher();
bytes32 subnetwork = Subnetwork.subnetwork(NETWORK, IDENTIFIER);
uint256 slashIndex = IVetoSlasher(slasher).requestSlash(
subnetwork,
operator,
amount,
captureTimestamp,
hints
)This call succeeds only if the following inequality holds:
requestSlashTimestamp + vetoDuration - captureTimestamp <= epochDurationResolvers
If a vault uses a VetoSlasher, there is a veto phase (duration set during vault deployment) when the resolver can veto the request.
Networks can set the resolver via IVetoSlasher(slasher).setResolver(identifier, resolver, hints).
