> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skatechain.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Skate EigenCloud AVS

> Overview of Skate EigenCloud AVS and Othentic's stack

## What is EigenCloud, Othentic?

The **Skate EigenCloud AVS** secures all its multi-chain operations, powered by **EigenCloud** (contracts and infra) and **Othentic** (tooling and configs).

* **EigenCloud:** The infrastructure layer (formerly EigenLayer) that provides the contracts and an unified operator network for restaked security. More at [https://eigencloud.xyz/](https://www.eigencloud.xyz/)

* **Othentic:** The AVS framework that provides the foundational tooling (CLI, governance, and attestation contracts) to manage the AVS. More At [https://othentic.xyz/](https://www.othentic.xyz/)

## EigenCloud Security Model (Restaking, Slashing)

The security is rooted in the **EigenCloud restaking model** based on Economic Security:

* **Restaking:** Operators secure their role by restaking ETH/LSTs, providing **capital collateral** against misbehavior.

* **Slashing:** Malicious activity results in a loss of this collateral. It is enforced for any critical security breach amongst AVS's operators, e.g. attesting to or submitting an invalid proof (which include tasks that was never legitimately executed/submitted).

Evidently, the Economic Security Guarantees provides:

* **Pooled Security:** The total value of ETH restaked ensures a high **Cost of Corruption**, making a hostile takeover uneconomical.

* **Slashing-Based Guarantee:** The security commitment is to maintain sufficient restaked capital to penalize any fraudulent proof submission. This target is calibrated to **secure the aggregate liquidity of the Stateless AMM against invalid cross-chain state updates and fraudulent settlement claims**.

## Skate AVS Network Components

The Othentic Stack utilizes libp2p for inter-node communication to ensure a robust, efficient, and decentralized attestation process. Four types of nodes are involved:

1. **Task Performer**<br />
   Collect tasks from the Message Box, sign them, and then publish them to aggregator via a JSON-RPC server. For data-intensive applications, the Task Performer acts as an authority to source/pre-validate data for the AVS network, such as an application that requires Oracle

2. **Task Aggregator**<br />
   The Aggregator monitors and aggregates attestations within the network. It receive performer update from performer and publish the task to a **p2p channel**, effectively requesting attester to participate in the attestation process.

3. **Attesters**<br />
   Subscribe to the **p2p channel** and sign using BLS signatures to participate in the attestation process. These nodes must ensure the validity of the underlying task data (executor calldata) and are therefore subject to rewards or slashing.

4. **Bootstrappers**<br />
   These robust nodes keep the p2p network alive by maintaining and updating the Distributed Hash Table for peer discovery.

<Note>
  Performer, Aggregator, and Attester must be an AVS operator.
</Note>

A sample attestation flow is depicted in the diagram below:

<Card title="AVS Flow Diagram">
  ```mermaid theme={null}
    flowchart 
      MB[Message Box]
      performer[Task Performer]
      p2p[P2P Pubsub Channel]
      jsonRPC[Json-RPC server]
      blsAggregator[BLS Aggregation Module]


      MB -- "collect Tasks" --> performer

      subgraph aggregator[Task Aggregator]
        jsonRPC
        blsAggregator
      end

      performer -- "dispatch" --> jsonRPC

      blsAggregator -- "1) publish" --> p2p

      attester1[Attester 1]
      attester2[Attester 2]
      attester3[Attester 3]

      attester1 -- "2) subscribe" --> p2p
      p2p -. "task" .-> attester1

      attester2 -- "2) subscribe" --> p2p
      p2p -. "task" .-> attester2

      attester3 -- "2) subscribe" --> p2p
      p2p -. "task" .-> attester3

      attester1 -- "3) vote" --> blsAggregator
      attester2 -- "3) vote" --> blsAggregator
      attester3 -- "3) vote" --> blsAggregator

      quorumReached{"Is Quorum\n Reached?"}
      blsAggregator -- "4) check" --> quorumReached

      quorumReached -- "yes" --> AC[Attestation Center]

      AC -- "OUT" --> data(Verified task data)
  ```
</Card>

## AVS Smart Contracts

As mentioned, Skate leverages [Othentic's stack](https://docs.othentic.xyz/main/welcome/architecture#smart-contracts), which comes with the following core contracts:

1. **AVS Governance**<br />
   A set of governance contracts oversees the registration, slashing, and reward distribution for all AVS operators. These contracts operate on Ethereum L1, where all EigenLayer restakers reside, as one must be an EigenLayer staker to participate as an AVS operator.

2. **Attestation Center**<br />
   These contracts handle attestation processing, including signature aggregation for each quorum, which involves verifying a batch of tasks. They also manage the business logic for distributing rewards for operations and post-processing. Due to the high cost of these processes, the contracts are deployed on L2 and update L1 through the Network Management layer.

3. **Network Management Layer**<br />
   A cross-chain messaging layer ensures synchronization between the AVS Governance contracts on L1 and the Attestation Center on L2.
