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

# Architecture

Ekiden's architecture provides speed, transparency, and resilience through a hybrid design that balances off-chain performance with on-chain trust. It operates across three key layers: Client, Infrastructure and Smart contract layer.

## 1. Client Layer

The Client Layer is the entry point for all user interactions. Users engage with the platform through:

* **Non-Custodial Canton Wallet** – Users maintain full control of their assets.
* **Ekiden CLOB dApp** – Interface to submit orders and view the order book.
* **Ekiden API** – Programmatic trading access for algorithmic strategies.
* **Submit Orders** – Market and limit order support.
* **Deposit/Withdraw** – Vault-based funds management.

## 2. Infrastructure Layer

Handles all off-chain operations for high-speed trading.

* **Engine Service** – Validates orders, manages active trading state, matches orders, evaluates triggers, and handles liquidation logic.
* **Orderbook Root Hash** – Anchored on-chain for transparency.
* **Inclusion Proofs** – Merkle proofs provide auditability.

## 3. Smart Contract Layer

Runs on Canton to ensure onchain settlement and state integrity.

* **Orderbook Verifier** – Validates trades using Merkle proofs.
* **Clearinghouse** – Manages collateral and finalizes trades.
* **Position Registry** – Tracks open positions, supports withdrawals.
* **Vaults** – Modular and secure fund storage.
* **State Updates** – Settlements and balances are updated on-chain.

## Hybrid Design

Ekiden’s architecture combines:

* **Off-chain speed** – Fast matching, low latency, and scalable infrastructure.
* **On-chain integrity** and Privacy anchored on Canton.

This hybrid model delivers the performance of centralized exchanges with the security and control of DeFi platforms.
