> For the complete documentation index, see [llms.txt](https://docs.lazai.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lazai.network/quorum-based-bft-consensus/slashing-and-challenger-system.md).

# Slashing & Challenger System

### Purpose

Ensure data validity and computation integrity by enabling any participant to challenge dishonest or incorrect submissions (e.g., invalid datasets, forged proofs, malicious inference). If proven correct, the challenger is rewarded, and the malicious party is penalized through slashing.

* **Fraud Detection:** Any party can submit a FraudProof against a committed block.
* **Resolution:**
  * LazChain executes a fraud arbitration contract using on-chain or TEE-based verification.
  * If the proof is valid:
    * Proposer is slashed
    * Validating signers are penalized (if collusion proven)
    * Challenger is rewarded

### Core Components

<table data-header-hidden><thead><tr><th width="179.8046875"></th><th></th></tr></thead><tbody><tr><td><strong>Component</strong></td><td><strong>Role</strong></td></tr><tr><td>Proposer</td><td>The validator/quorum member who proposed the block or submitted the AI asset/proof.</td></tr><tr><td>Challenger</td><td>Any external actor who submits evidence that a committed dataset, proof, or result is invalid or fraudulent.</td></tr><tr><td>Arbitration Contract</td><td>A smart contract that validates fraud proofs (ZK, Merkle, TEE attestations) and enforces punishment/reward.</td></tr><tr><td>Slashing Pool</td><td>Staked tokens held by proposers and quorum validators, which can be reduced (slashed) in the event of fraud.</td></tr><tr><td>Challenge Window</td><td>The period (e.g., 100 blocks) during which a committed block/result can be challenged.</td></tr></tbody></table>

***

### Challenge Flow

#### Step  1: Fraud Detection

A challenger observes that a committed dataset, model, or inference result is invalid.&#x20;

**Examples:**

* Malformed or manipulated dataset hash
* Proof mismatch (ZK, OP)
* Inference result contradicts source input

**They prepare a Fraud Proof:**

`struct FraudProof {`

&#x20;   `bytes32 disputedBlockHash;`

&#x20;   `bytes challengeData;`       // could be Merkle branch, ZK transcript, etc.

&#x20;   `uint256 timestamp;`

&#x20;   `address challenger;`

`}`

#### Step 2: Challenge Submission

The challenger calls:

`challengeBlock(bytes32 disputedBlockHash, FraudProof calldata proof)`

The contract:

* Checks challengeWindow validity (block not too old)
* Validates the `proof.challengeData`
* Calls appropriate verifier (e.g., MerkleVerifier, ZKVerifier, TEECertifier)

#### Step 3: Arbitration & Result

If the fraud proof is <mark style="color:green;">**valid**</mark>:

<table data-header-hidden><thead><tr><th width="222.203125"></th><th></th></tr></thead><tbody><tr><td><strong>Action</strong></td><td><strong>Effect</strong></td></tr><tr><td>🏆 Challenger wins</td><td>Receives reward from slashing pool (e.g., 10% of stake)</td></tr><tr><td>⛔ Proposer slashed</td><td>Their stake is burned or redistributed</td></tr><tr><td>⚠️ Quorum Validators (optional)</td><td>Can be penalized (reduced rewards, stake slashing) if collusion proven</td></tr><tr><td>❌ Fraudulent block/result</td><td>Marked invalid, removed or reverted in local state</td></tr><tr><td>🧠 DATs minted</td><td>May be burned or frozen if tied to fraudulent data</td></tr></tbody></table>

If the fraud proof is <mark style="color:red;">**invalid**</mark>:

* The challenger may lose a small bond (anti-spam)
* Block and proposer remain valid

### Challenge Types

<table data-header-hidden><thead><tr><th width="188.90234375"></th><th width="356.6015625"></th><th></th></tr></thead><tbody><tr><td><strong>Type</strong></td><td><strong>Description</strong></td><td><strong>Verifier</strong></td></tr><tr><td>ZK Challenge</td><td>Submitted proof is invalid or unverifiable</td><td>ZKVerifier</td></tr><tr><td>TEE Challenge</td><td>TEE signature or report mismatch</td><td>TEECertifier</td></tr><tr><td>Inference Discrepancy</td><td>Output does not match expected inference</td><td>OP / Result Replay</td></tr><tr><td>Dataset Integrity</td><td>Dataset hash does not match anchor</td><td>MerkleVerifier</td></tr><tr><td>Behavioral Fraud</td><td>Agent performs unauthorized behavior (e.g. overcharge, illegal write)</td><td>AgentAuditContract</td></tr></tbody></table>

### Slashing Logic

<table data-header-hidden><thead><tr><th width="188.453125"></th><th width="361.78515625"></th><th></th></tr></thead><tbody><tr><td><strong>Actor</strong></td><td><strong>Condition</strong></td><td><strong>Slash Amount (example)</strong></td></tr><tr><td>Proposer</td><td>Proven to have submitted invalid block/proof</td><td>30%–100% of stake</td></tr><tr><td>Validator</td><td>Signed off on invalid block (optional check)</td><td>10%–30% if collusion</td></tr><tr><td>Challenger</td><td>Submitted invalid challenge</td><td>Forfeit 1%–5% challenge bond</td></tr></tbody></table>

### Challenge Timing Parameters

<table data-header-hidden><thead><tr><th width="191.78515625"></th><th width="362.08203125"></th><th></th></tr></thead><tbody><tr><td><strong>Parameter</strong></td><td><strong>Description</strong></td><td><strong>Example Value</strong></td></tr><tr><td>challengeWindow</td><td>Max blocks after proposal that a challenge is valid</td><td>100 blocks</td></tr><tr><td>verificationTimeout</td><td>Max time for contract to verify a proof</td><td>1 minute</td></tr><tr><td>slashingDelay</td><td>Delay before applying slashing, to allow appeals</td><td>10 blocks</td></tr></tbody></table>

### Integration with DAT

* Fraudulent data detected → affected DAT tokens are frozen or burned.
* Ownership reverted or flagged in registry.
* Affected classId can be blacklisted temporarily.
* Future token mints in that class may require stronger verification (e.g., quorum + external verifier).

### Incentive Summary

<table data-header-hidden><thead><tr><th width="189.046875"></th><th></th></tr></thead><tbody><tr><td><strong>Role</strong></td><td><strong>Incentive</strong></td></tr><tr><td>Challenger</td><td>Wins reward from slashed stake if proof is valid</td></tr><tr><td>Validator</td><td>Earns block rewards, but penalized for signing off on invalidity</td></tr><tr><td>Proposer</td><td>Gets rewards if honest, slashed if caught submitting invalid work</td></tr><tr><td>iDAO</td><td>Maintains reputation and stake power through accurate participation</td></tr></tbody></table>

#### Example

Dataset submitted with wrong hash, minted as DAT.

A challenger finds the original file on IPFS and submits a Merkle branch proving mismatch.

challengeBlock() is called, validated → proposer slashed, challenger rewarded, DAT frozen.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lazai.network/quorum-based-bft-consensus/slashing-and-challenger-system.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
