> ## 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 Action Flow

> The end-to-end flow of a user action across chains via **Skate infrastructure**

All Skate user Actions/Intents are processed by 3 different stages (on 3 different chains) following the below procedures

## 1. Periphery Source Chain: User-Initiated Action

**1. User Action**

User interacts with **App Periphery Contract** on the source chain, optionally depositing staged assets.

**2. Skate Action Box**

The **App Periphery Contract** initiates an action by sending details through the **Skate Action Box**.

**3. Acknowledgement and Verification**

**Skate Indexing Services** detect the action from **Action Box** and forward it to **EigenCloud** for verification by registered operators.

> [!NOTE]
>
> Action struct emitted from Action Box
>
> ```solidity theme={null}
> struct Action {
>   bytes32 user; // Unique identifier for the action
>   address kernelApp; // Skate chain address of the intent receiver
>   string kernelMethod; // Metadata to decode kernel call
>   bytes kernelData; // The data attached to the call
> }
> ```

***

## 2. Kernel Skatechain / EigenCloud: Verification and State Update

**1. Operator Verification**

**EigenCloud Operators** verify the action and instruct the **Executor** to update state on the **KernelAdapter** using **Intents**.

**2. Message Delivery**

The **Executor** submits the intent through `submitTasks` in the **MessageBox**.
The **MessageBox** routes the update to the corresponding **KernelAdapter**, which serves as the state machine of the cross-chain application.

**3. Task Construction**

The **KernelAdapter** defines the logic to construct **Tasks**, each containing settlement information such as:

* Token transfers
* Attached data
* Involved addresses or accounts

**4. Task Signing**

**Task Events** are picked up and signed by operators for settlement on destination chains.

> [!NOTE]
>
> Intent struct verified by EigenCloud before parsing into MessageBox
>
> ```solidity theme={null}
> struct Intent {
>   bytes32 actionId;
>   bytes32 user;
>   bytes32 srcApp;
>   address kernelApp;
>   uint256 chainId;
>   uint256 vmType;
>   string kernelMethod; // EVM Abi
>   bytes kernelData; // EVM abi encoded bytes
>   bytes relayerSignature;
> }
> ```
>
> Output Task struct from the MessageBox/KernelApp
>
> ```solidity theme={null}
> struct Task {
>   bytes32 actionId;
>   bytes32 appAddress;
>   bytes32 user;
>   uint256 srcChainId;
>   uint256 srcVmType;
>   uint256 destChainId;
>   uint256 destVmType;
>   string method;
>   bytes data;
> }
> ```

***

## 3. Periphery Destination Chain: Settlement & Execution

**1. Task Execution**

The **Executor** gathers signed tasks and calls `executeTask` on the **SkateGateway** of the destination periphery chain.

**2. Verification & Delivery**

The **SkateGateway** verifies each task (checking signatures, preventing double spending, validating accounting state, etc.) and forwards it to the target **PeripheryApp**.

**3. Settlement Completion**

The **PeripheryApp** executes the settlement logic:

* Releases assets
* Closes accounts (if any)
* Emits relevant events

**4. Finalization & Acknowledgment**

The **EigenOperator** acknowledges the settled state for potential future disputes.\
The **slashing window** follows **EigenLayer’s** protocol.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.