# Modules

## Overview

Othentic Stack introduces Slashing Modules. Each **module** corresponds to a specific, predefined slashing condition representing common misbehavior in distributed systems. These modules can be configured through the [SlashingConfig](#slashing-module-configuration) mechanism, enabled or disabled independently, and are enforced by the [Challenger System](#challenger-system).

### 1. Double Attestations

An operator submits multiple attestations for the same task, potentially with conflicting results.

{% hint style="info" %}
**Example**:\
An operator attests to both `true` and `false` for the same Task, attempting to appease multiple parties or be included in task consensus without executing the logic required.
{% endhint %}

**Important Note**: When enabled, this module applies to all [task definitions](https://docs.othentic.xyz/main/learn/core-concepts/tasks/task-definitions) in the AVS.

<figure><picture><source srcset="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FswFQFJbv5oYzijWF2J8m%2FDoubleAttestation.png?alt=media&#x26;token=e7e76e2c-384a-4e3e-8557-f282104c22ae" media="(prefers-color-scheme: dark)"><img src="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FS0Wt19bv8M4wLQWhiAt0%2Fimage.png?alt=media&#x26;token=6d8d9c83-80f0-4f42-b10a-6ac931527ec8" alt="" width="563"></picture><figcaption><p>Double Attestation</p></figcaption></figure>

#### When to use this module?

Use this module when you want to discourage dishonest or lazy Operators from gaming the system by skipping validation logic to save compute costs. Some Operators may attempt to send **conflicting attestations (e.g., both `true` and `false`)** to maximize their chances of being included in task consensus and accrue rewards.

Such behavior undermines the Validation process of the network and integrity of the Attester. Enabling this condition ensures that all Attesters reliably run the Validation Service.&#x20;

### **2. Rejected Task**

This condition is triggered when the task executed by the **Performer** is **rejected** by AVS consensus. If this condition is enabled and applicable to the task ID, the **Performer** of task that is ultimately rejected will be slashed.

{% hint style="info" %}
**Example**:\
A Performer submitting incorrect `proofOfTask` for a Task, and AVS consensus rejects it.
{% endhint %}

**Important Note**:

* Rejected tasks can occur due to improper implementation of [Execution](https://docs.othentic.xyz/main/learn/core-concepts/execution-service) or [Validation](https://docs.othentic.xyz/main/learn/core-concepts/validation-service) services in the AVS node software.
* Governance should only enable this condition after ensuring that both task execution and validation logic are stable, deterministic, and correctly implemented for that specific task.
* This module is configured per Task Definition. This allows compartmentalization of Slashing conditions. See [setIsRejectedTaskSlashingEnabled](https://docs.othentic.xyz/main/reference/contracts/attestation-center#setisrejectedtaskslashingenabled) function in AttestationCenter for how to enable this module.

<figure><picture><source srcset="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FRjiBCniltHFbMNTXwJYP%2FRejectedTask.png?alt=media&#x26;token=32b20722-0e31-42fd-822f-12a5f6e59776" media="(prefers-color-scheme: dark)"><img src="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FLBy6pG88GIHDu3xWS9xv%2Fimage.png?alt=media&#x26;token=de726ce9-4576-4428-ac19-acafa78788bc" alt="" width="563"></picture><figcaption><p>Rejected Task</p></figcaption></figure>

#### When to use this module?

Use this module when you want to prevent Performers spamming with invalid task results or tampering with the outputs for their own benefits. Such behavior can degrade network performance and lead to unnecessary compute usage by Attesters, ultimately reducing the efficiency and reliability of the AVS. Its especially important for high throughput AVSs.&#x20;

### **3. Incorrect Attestations**

This condition is triggered when an operator submits an attestation that conflicts with the final consensus of the network. This applies whether the task was approved or rejected — the operator’s attestation must match the consensus.

{% hint style="info" %}
**Example**:\
An operator submits an attestation claiming the result is `true`, but the consensus proves the correct output to be `false` or vice versa.
{% endhint %}

**Important Note**:

* This condition must also be enabled per task definition using [setIsIncorrectAttestationSlashingEnabled](https://docs.othentic.xyz/main/reference/contracts/attestation-center#setisincorrectattestationslashingenabled).
* Enabling this condition should only be done after ensuring that both task execution and validation logic are stable, deterministic, and correctly implemented for that specific task.
* Once a consensus is finalized for a task, anyone can compare an operator’s attestation to that consensus.&#x20;
  * Any registered operator can submit a slashing proof if an operator attests incorrectly.
  * This [challenger](#challenger-system) is then rewarded from the slashed stake.

<figure><picture><source srcset="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FWpkrGFwMD7wobGXf7gPW%2FIncorrect.png?alt=media&#x26;token=48f9398a-4783-49c6-b51f-ece584d47788" media="(prefers-color-scheme: dark)"><img src="https://4144525652-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYlSi30nrcEOossIDFFua%2Fuploads%2FW3z8GHHd0ZPzaaX4mJ46%2Fimage.png?alt=media&#x26;token=513dc621-2258-499c-a402-33fad074464a" alt="" width="563"></picture><figcaption><p>Incorrect Attestation</p></figcaption></figure>

#### When to use this module?

Use this module when you want to enforce strict alignment among the individual attestations and network consensus, especially in AVSs where validation logic is **deterministic.** It ensures that Operators are not behaving negligently or maliciously by submitting incorrect attestations.

***

## Slashing Module Configuration

Each [Slashing Module](#overview) can be configured independently.

* **activated**\
  A flag indicating whether this slashing condition is currently active.
  * This allows AVS governance to temporarily turn off certain slashing conditions (e.g., during protocol upgrades, testing new behavior, or in the early stages of rollout).
* **ejectOperator**

  Determines whether an operator should be **automatically ejected** from the network if they violate this slashing condition.

  * `true`: The operator will be slashed and permanently removed (blacklisted) from the AVS upon violation.
  * `false`: The operator will only be slashed (i.e., lose a percentage of their stake) but will remain part of the operator set.
* **stakeSlashedPercentage**\
  The percentage of the operator’s stake that will be slashed (deducted) when this condition is triggered.
  * Slashing affects only the [**unique stake**](https://docs.eigenlayer.xyz/eigenlayer/concepts/slashing/unique-stake) of the operator, not their total EigenLayer stake unless configured otherwise via AVS registry.

### Functions

* [updateSlashingConfig](https://docs.othentic.xyz/main/reference/contracts/avs-governance#updateslashingconfig) - create or update the configuration for a specific slashing condition.

{% hint style="info" %}
Slashing conditions (e.g., [**Rejected Task**](#id-2.-rejected-task) and [**Incorrect Attestations**](#id-3.-incorrect-attestations)) can occur due incorrect implementations in the AVS’s execution or validation logic. To prevent unfair Slashing, these conditions must be **explicitly enabled per task definition**. This ensures that slashing only applies to tasks the AVS has thoroughly tested and validated. You can configure this using [Task-Specific Slashing functions](https://docs.othentic.xyz/main/reference/contracts/attestation-center#task-specific-slashing-configuration):

* [`setIsRejectedTaskSlashingEnabled`](https://docs.othentic.xyz/main/reference/contracts/attestation-center#setisrejectedtaskslashingenabled)
* [`setIsIncorrectAttestationSlashingEnabled`](https://docs.othentic.xyz/main/reference/contracts/attestation-center#setisincorrectattestationslashingenabled)

These functions must also be called respectively to activate those specific slashing conditions.
{% endhint %}

* [getSlashingConfig](https://docs.othentic.xyz/main/reference/contracts/avs-governance#getslashingconfig) - get configuration details for a specific slashing condition.

#### Read More:

* [CLI Reference: Set Slashing Configuration](https://docs.othentic.xyz/main/reference/othentic-cli/network/set-slashing-config)

***

## **Challenger System**

The **Challenger System** is a mechanism that allows **any registered Operator** to report misbehavior committed by other operators in the AVS.&#x20;

* The Othentic Stack includes checks for different slashing conditions and automatically triggers penalties when valid proof is submitted.
* Challengers are incentivized to participate through **monetary rewards**, which are paid out from the **slashed stake** of the misbehaving operator.
* Operators can submit proof within **7 days** of the misconduct.

### Configuration

AVSs need to configure the **reward amount** that a successful challenger receives when they submit a valid slashing proof. The reward is **paid from the slashed stake** of the penalized operator.&#x20;

* &#x20;[setChallengerRewardFee](https://docs.othentic.xyz/main/reference/contracts/attestation-center#setchallengerrewardfee) - configure challenge rewards fee.

#### Operator

Operators can enable their node to submit slashing proofs and earn challenge rewards by using the `--slashing-challenger` flag, as specified in the respective[ attester](https://docs.othentic.xyz/main/reference/otnode/attester) and [aggregator](https://docs.othentic.xyz/main/reference/otnode/aggregator) CLI commands.&#x20;

Once enabled, the node will actively monitor for violations and submit proofs when detected. For each violation, the one Operator submitting the transaction will be eligible to receive the challenge reward.

### Functions

These slashing functions are designed to be executed by challengers, i.e., any registered Operator who observes verifiable misbehavior by an operator.

* &#x20;[slashOperatorForIncorrectAttestation](https://docs.othentic.xyz/main/reference/contracts/attestation-center#slashoperatorforincorrectattestation) - challenge an operator who submitted an attestation that contradicts the final consensus result for a given task.
* &#x20;[slashOperatorForDoubleAttestation](https://docs.othentic.xyz/main/reference/contracts/attestation-center#slashoperatorfordoubleattestation) - allows any challenger to submit proof that an operator has committed a double attestation —submitting two conflicting attestations for the same task. If valid, the slashing logic defined in the AVS is triggered.

Its required to submit valid, verifiable, and deterministic proofs. The system automatically enforces the configured slashing penalties (percentage-based and/or ejection) for the reported operator.&#x20;
