Slashing Setup

This guide walks you through the process of enabling and configuring slashing for your network using the Othentic Stack.

Slashing in the Othentic Stack can be enforced via Slashing Modules, Custom Slashing, or both.

Read More

Prerequisites

  • AVS Contract addresses

  • Access to AVS governance multisig account

Enable Slashing Modules

1

Unpause Slashing flow

Unpause the Slashing flow to activate the slashing mechanism:

otcli network unpause-flow

Select Slashing flow.

2

Update Slashing Modules Configuration

Decide on which Slashing Modules you wish to enable.

Then, for each module, use the updateSlashingConfig function in the AVSGovernance contract to configure slashing conditions, including:

3

Enable Slashing conditions per task definition

For Rejected Tasks or Incorrect Attestations conditions, after configuring the module in AVSGovernance, you must enable slashing per Task Definition in AttestationCenter contract.

4

Set Challenger Rewards

For Rejected Tasks or Incorrect Attestations conditions, define the reward given to challengers who submit valid proofs of misbehavior.

Use the setChallengerRewardFee function in the AttestationCenter contract to set the reward amount for a valid challenge submitted by an operator.

Learn more about the Challenger System here.

5

[Optional] Set minimum Slashable Stake

Define the minimum slashable stake an Operator must maintain to be eligible for slashing:

otcli network set-min-slashable-stake

Enable Custom Slashing

1

Unpause Slashing flow

Unpause the Slashing flow to activate the slashing mechanism:

otcli network unpause-flow

Select the Slashing flow when prompted.

2

Assign Slashing Roles

Assign the required roles using Slashing Roles Configuration functions in the AttestationCenter contract.

  • Set or revoke SLASHER : Use setSlasher or revokeSlasher functions

  • Set or revoke Ejector : Use setEjector or revokeEjector functions

3

Use Custom Slashing methods

Customize the logic to trigger the custom slashing functions like ejectOperatorFromNetwork and applyCustomSlashing.


Enable Redistribution

To enable Redistribution in an AVS, follow these steps:

1

Deploy Redistribution Logic Contract

Create a smart contract that implements the IRedistribution interface. This contract defines the logic for how slashed funds will be redistributed.

IRedistributionLogic
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.8.25;

/*______     __      __                              __      __ 
 /      \   /  |    /  |                            /  |    /  |
/$$$$$$  | _$$ |_   $$ |____    ______   _______   _$$ |_   $$/   _______ 
$$ |  $$ |/ $$   |  $$      \  /      \ /       \ / $$   |  /  | /       |
$$ |  $$ |$$$$$$/   $$$$$$$  |/$$$$$$  |$$$$$$$  |$$$$$$/   $$ |/$$$$$$$/ 
$$ |  $$ |  $$ | __ $$ |  $$ |$$    $$ |$$ |  $$ |  $$ | __ $$ |$$ |
$$ \__$$ |  $$ |/  |$$ |  $$ |$$$$$$$$/ $$ |  $$ |  $$ |/  |$$ |$$ \_____ 
$$    $$/   $$  $$/ $$ |  $$ |$$       |$$ |  $$ |  $$  $$/ $$ |$$       |
 $$$$$$/     $$$$/  $$/   $$/  $$$$$$$/ $$/   $$/    $$$$/  $$/  $$$$$$$/
*/

import {IRedistributionManager} from "./IRedistributionManager.sol";

/**
 * @author Othentic Labs LTD.
 * @notice Terms of Service: https://www.othentic.xyz/terms-of-service
 * @notice Depending on the application, it may be necessary to add reentrancy gaurds to hooks
 */

interface IRedistributionLogic {
    function redistribute(uint256 _slashId, IRedistributionManager.SlashDetails calldata _slashDetails) external;
}

2

Set Redistribution Logic contract

Once your logic contract is deployed, you must register it with the Redistribution Manager using a two-step governance flow:

  • queueRedistributionLogic: proposes the new Redistribution Logic contract. This triggers the start of the delay period.

  • completeRedistributionLogic: finalizes the change after the delay has passed.

queueRedistributionLogic(address newLogic);
completeRedistributionLogic();
3

Verify Setup

To verify whether a Redistribution Logic contract has been set, use the getRedistributionLogic read method on the Redistribution Manager contract.

Last updated