> For the complete documentation index, see [llms.txt](https://docs.zetrix.com/zetrix-l2-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zetrix.com/zetrix-l2-documentation/architecture/trust-model.md). Agents can also search and read this documentation through its [MCP server](https://docs.zetrix.com/zetrix-l2-documentation/~gitbook/mcp).

# Trust Model

Z2 is an **AnyTrust optimistic rollup** (DA Committee + L1 calldata fallback), with the escape-hatch and fail-closed guarantees described below.

## Security Assumptions

Z2 inherits its ultimate security guarantees from Zetrix L1 and relies on an **optimistic** trust model with **committee-based data availability**. The assumptions are:

1. **At least one honest verifier** — The system is safe as long as **at least one honest Watcher** re-executes state transitions and is able to submit a fraud proof to L1 within the challenge window. This is the classic "1-of-N honest" liveness-of-verification assumption of optimistic systems.
2. **L1 availability and censorship-resistance** — Zetrix L1 accepts commitments, assertions, and fraud-proof transactions within bounded time.
3. **Data availability via the DAC, with L1 calldata fallback (AnyTrust)** — Normally the batch data is held off-chain and the **Data Availability Committee (DAC, 5 members)** attests that it is stored and retrievable. **If the committee cannot reach its attestation threshold, the Sequencer falls back to posting the full batch as L1 calldata.** Consequently data can never *silently* disappear: either the DAC serves it, or it is on L1. This is a **stronger** DA guarantee than a pure Validium and is the reason Z2 is described as an AnyTrust rollup.
4. **Committee threshold for soft confirmation (liveness, not final safety)** — The Committee runs **5 members (committee bundles) and requires 3-of-5** to soft-confirm a proposed assertion and attest data availability. Soft confirmations improve UX but do **not** replace L1 final confirmation for safety-critical operations.
5. **Fail-closed operation** — The pipeline **halts on uncertain L1 reads** rather than proceeding on possibly-stale state, preventing the system from acting on an inconsistent view of L1.
6. **Censorship resistance (escape hatch)** — If the Sequencer censors a user, the user can **force-include** their transaction directly via the L1 Sequencer Inbox.
7. **Cryptographic soundness** — Signature schemes and hash functions used for commitments, batch signing, aggregation, and assertions are secure.

> \[!WARNING] Soft confirmations are a UX convenience backed by the Committee's economic and reputational stake. Funds and high-value operations should be considered **settled only after final confirmation on L1**, once the challenge window has elapsed without a successful dispute.

## Roles in the Trust Model

<figure><img src="https://2208647221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftb2llNZXY6vV8lLZP1Sk%2Fuploads%2FU9XhKQAywjuMlMqFesCJ%2FAgentix%20Architecture-2026-07-24-093217.png?alt=media&amp;token=e837c657-06d0-4f46-b6a7-1f2cbc33eca3" alt=""><figcaption></figcaption></figure>

| Role           | Function                                                                                                                                                                                               | Trust contribution                                                       |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| **Committee**  | Five bundles (**Z2 Node + Z2 Validator** each) sharing **one Reexecutor**; validators check the Proposer's assertion and sign off-chain at **3-of-5**; each bundle keeps a copy of the batch data (DA) | Fast soft confirmation + data availability under the 3-of-5 threshold    |
| **Aggregator** | Collects the committee signatures from the gossip bus and, at 3 of 5, submits the soft confirmation to the **Rollup**                                                                                  | One L1 transaction per soft confirmation; members never submit their own |
| **Proposer**   | Replays the new batches with **its own Reexecutor** and proposes the resulting state as an assertion on the **Rollup**; also runs a Watcher role                                                       | Bridges L2 state to L1 settlement                                        |
| **Watchers**   | Each runs **its own Reexecutor**; fetch data from the DAC, re-execute, and open a dispute on the **Challenger** on mismatch; earn rewards for honest disputes                                          | Safety (1-of-N honest)                                                   |

## Committee

The **Committee** verifies and signs the **assertion created by the Proposer**, producing the signatures that constitute a **soft confirmation**, and holds the batch data for **data availability (DAC)**. The Committee:

* Runs **5 members (committee bundles)** and requires **3-of-5** signatures to soft-confirm.
* Each member is a bundle of a **Z2 Node and a Z2 Validator** (committee and aggregator roles) with its own copy of the batch data. Each bundle runs on its own server.
* The five validators check each assertion with **one shared Z2 Reexecutor**: it replays the same batches, and a validator signs only if the result matches. On the testnet one verification takes about 1.4 seconds.
* Signatures are exchanged **off-chain over the committee's gossip bus**. When 3 of 5 agree, an aggregator submits the soft confirmation to the Rollup. Members do not send their own L1 transaction to sign.
* Stores the batch data the Sequencers send it and attests to it, mapped to the commitment posted to the Sequencer Inbox.
* Provides a fast, high-confidence signal to users and applications ahead of L1 finality.

The Committee's 3-of-5 threshold governs *liveness of soft confirmation and data availability*, not the safety of final settlement — safety is protected by Watchers and L1.

### Data Availability Committee (DAC) — AnyTrust

Z2 uses an **AnyTrust** data-availability model. **Three Sequencers**, each reading its own node, batch the transactions. For every batch a Sequencer sends the data to the **five committee members** and collects their attestations; with **3 attestations** it builds the **data certificate** and posts the commitment to the L1 **Sequencer Inbox**. The full data stays **off-chain**, keeping cost low. Validators and Watchers **fetch data from the DAC** to re-execute and verify assertions.

> \[!IMPORTANT] **No silent DA loss.** If the committee **cannot reach its attestation threshold**, the Sequencer **falls back to posting the full batch as L1 calldata**. So data availability degrades gracefully to on-chain rather than failing: either the DAC serves the data, or it is available on L1. This is why Z2 is an **AnyTrust rollup** (comparable to Arbitrum Nova), not a pure Validium/Optimium — the DA trust assumption is meaningfully **safer** than committee-only DA.

## Aggregator

The **Aggregator** collects the committee validators' signatures from the gossip bus and, once **3 of 5** agree, submits the **soft confirmation to the Rollup** on L1. This:

* Keeps signing off-chain: members sign and share over the gossip bus, and do not each send an L1 transaction.
* Puts one soft-confirmation transaction on L1 per assertion, instead of one per member.
* Provides a single verifiable object representing Committee consensus on an assertion.

The aggregator role is carried by the committee validators themselves (each bundle runs the committee and aggregator roles), so aggregation does not depend on a separate machine.

## Proposer

The **Main Proposer Validator** (the Proposer) is responsible for **proposing assertions** to Zetrix L1. An assertion is a claim about the resulting L2 state after applying a batch (or sequence of batches). The Proposer:

* Reads the batch commitment from the Sequencer Inbox and the corresponding data from the DAC.
* **Replays the new batches with its own Reexecutor** before proposing.
* Proposes the resulting state as an assertion on the **Rollup**, opening the challenge window.
* Also runs a **Watcher** role itself — it independently re-executes and can dispute, acting as the first always-on watcher.

The Committee then **verifies and signs** the proposed assertion (3-of-5) for soft confirmation. There is a single active Proposer in the current deployment (see [Main Proposer Validator](https://docs.zetrix.com/zetrix-l2-documentation/architecture/system-components.md#main-proposer-validator)); the Proposer role is replaceable and does not hold unilateral power to finalize invalid state, because a proposed assertion is soft-confirmed by the Committee and subject to dispute by any Watcher.

## Soft Confirmation

**Soft confirmation** is the fast, pre-L1 acknowledgement that a transaction has been included in a batch and validated by the Committee.

```mermaid
sequenceDiagram
    participant Prop as Proposer
    participant Comm as Committee validators
    participant Rex as Shared Reexecutor
    participant Agg as Aggregator
    participant L1 as Rollup (L1)
    participant User
    Prop->>L1: propose assertion
    Comm->>Rex: replay the same batches
    Rex-->>Comm: result (sign only if it matches)
    Comm->>Agg: signatures over gossip bus
    Agg->>L1: submit soft confirmation (3 of 5)
    Agg-->>User: soft confirmation
```

* **Latency:** sub-second to seconds (well ahead of L1 finality).
* **Guarantee:** the Committee (at 3-of-5) attests the Proposer's assertion is correct and data is available.
* **Use:** UX responsiveness, low-value/reversible flows, optimistic UI updates.

## Final Confirmation

**Final confirmation** occurs after the Proposer's assertion has been submitted to L1 and the challenge window has elapsed **without a successful dispute**.

* **Latency:** governed by the challenge window (dispute period) — **120 seconds on the testnet**. This is a testnet setting; confirm the value before relying on it as a general rule.
* **Guarantee:** L1-enforced; safe against Committee misbehavior given ≥1 honest Watcher.
* **Use:** withdrawals, high-value settlement, irreversible operations.

| Property          | Soft Confirmation         | Final Confirmation      |
| ----------------- | ------------------------- | ----------------------- |
| Latency           | Fast (seconds)            | Slow (challenge window) |
| Enforced by       | Committee                 | Zetrix L1               |
| Safety assumption | Honest-majority Committee | 1-of-N honest Watcher   |
| Recommended for   | UX, low value             | Withdrawals, high value |

## Fraud Detection

Fraud detection is performed by **Watchers** and **Reexecutors**, which **fetch the transaction data from the DAC**, independently re-execute it, and compare the resulting state root against the Proposer's soft-confirmed assertion.

```mermaid
flowchart TD
    A["Proposer's<br/>soft-confirmed assertion"] --> B["Watcher fetches<br/>data from DAC"]
    B --> C{"Re-execute:<br/>state root matches?"}
    C -->|matches| D["No action —<br/>assertion valid"]
    C -->|differs| E["Fraud detected"]
    E --> F["Watcher opens dispute<br/>on the Challenger (L1)"]
```

Detection is deterministic: given the same data from the DAC and the same EVM rules, honest re-execution must produce the same state root. Any divergence indicates an invalid assertion (or unavailable/invalid data). Honest Watchers that raise a valid dispute earn a reward (see [Dispute Process](#dispute-process)).

## Assertion Process

```mermaid
sequenceDiagram
    participant Seq as Sequencer
    participant DAC as Committee DA
    participant L1 as Zetrix L1
    participant Prop as Proposer
    participant Comm as Committee validators
    participant Agg as Aggregator
    Seq->>DAC: send batch data, collect 3 attestations
    Seq->>L1: post commitment with data certificate (Sequencer Inbox)
    Prop->>Prop: replay batches with own reexecutor
    Prop->>L1: propose assertion (Rollup)
    Comm->>Comm: shared reexecutor replays, sign if match
    Comm->>Agg: signatures over gossip bus
    Agg->>L1: submit soft confirmation (3 of 5)
    L1->>L1: record assertion, start challenge window
```

An **assertion** binds a batch (or range) to a resulting state root and is anchored on L1, referencing the commitment posted to the inbox. Once soft-confirmed and recorded, the assertion enters the challenge window. If unchallenged, it becomes final.

## Dispute Process

If a Watcher detects fraud, it opens a **dispute** against the assertion on the **Challenger** contract on L1. The dispute is resolved by an on-chain adjudication (fraud-proof / dispute game) that establishes which party's claimed state transition is correct.

```mermaid
sequenceDiagram
    participant Watch as Watcher
    participant L1 as Challenger (L1)
    participant Prop as Proposer
    Watch->>L1: open dispute against assertion
    L1->>Prop: notify challenge
    Note over L1: Interactive / single-step verification
    L1->>L1: evaluate contested state transition
    alt Assertion invalid
        L1-->>Watch: dispute upheld — assertion rejected
        L1->>Prop: penalize / discard invalid assertion
    else Assertion valid
        L1-->>Prop: dispute rejected — assertion stands
    end
```

**Outcome guarantees:**

* An **invalid assertion** is rejected before it can finalize, protecting user funds and state integrity.
* A **frivolous dispute** is rejected, protecting an honest Proposer.
* Final confirmation only proceeds for assertions that survive the challenge window.
* An **honest Watcher that wins a dispute earns a reward** — the incentive that sustains the 1-of-N honest assumption and encourages third-party participation.

> \[!NOTE] The security of the entire system reduces to: *at least one honest party fetches the data from the DAC, re-executes, and is willing and able to dispute*. This is why the platform actively encourages **third-party Watchers** with dispute rewards (see [Watcher](https://docs.zetrix.com/zetrix-l2-documentation/architecture/system-components.md#watcher)). Note that data availability is backstopped by the L1 calldata fallback — see [Data Availability Committee (DAC) — AnyTrust](#data-availability-committee-dac--anytrust).

## L1 Settlement Contracts

Z2 settlement on Zetrix L1 is anchored by a small set of contracts:

| Contract                | Purpose                                                                                                                                                                                                                                                                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Sequencer Inbox**     | Records the ordered batch sequence posted by the Sequencer (and accepts force-included user transactions).                                                                                                                                                                                                                     |
| **Rollup**              | Holds the chain of state **assertions** through three steps: **propose**, **soft-confirm** and **confirm**. The Proposer posts assertions here via `createAssertion`; the aggregator submits the committee's soft confirmation; after the challenge window with no successful dispute they become **confirmed — final on L1**. |
| **Committee & Staking** | Records the committee set and the validators' stakes.                                                                                                                                                                                                                                                                          |
| **Challenger**          | Handles disputes over wrong assertions. Watchers open a dispute here when re-execution does not match.                                                                                                                                                                                                                         |
| **Bridge & Outbox**     | Custodies bridged assets (**ZTP-20**, **ZTP-721**). The **Outbox** processes L2→L1 withdrawals: a withdrawal is claimed on L1 with a **Merkle proof** against a confirmed assertion.                                                                                                                                           |

## Censorship Resistance (Escape Hatch)

If the Sequencer censors or omits a user's transaction, the user can **force-include** it directly through the L1 **Sequencer Inbox**. This guarantees users an L1-enforced path to transact even without Sequencer cooperation — a core liveness/trust property.

## Operator Signing (z2-signer / HSM)

Operator and application signing keys are protected by **`z2-signer`**, a **hardware-backed (HSM) signing service**. Privileged signing (Sequencer, Proposer, DAC members, Refueler, bridge operators) is performed through `z2-signer` so raw private keys are never exposed in application memory or configuration. See also [Security](https://docs.zetrix.com/zetrix-l2-documentation/architecture/system-components.md#security).

***

[← Overall Architecture](https://docs.zetrix.com/zetrix-l2-documentation/architecture/overall-architecture.md) · [Index](https://docs.zetrix.com/zetrix-l2-documentation/readme.md) · [System Components →](https://docs.zetrix.com/zetrix-l2-documentation/architecture/system-components.md)
