Skip to main content

High-Level Overview

CLOAK uses a modular architecture that separates user intent from on-chain execution. This separation is the basis of the privacy model. The system comprises three main components:
  1. User Client (Web App): Wallet connection and intent signing.
  2. Relay & Orchestrator: Backend services that process intents and manage execution.
  3. Executor Network: A set of hot wallets that submit transactions to the blockchain.

Key Components

1. Relay Layer

The Relay is a stateless service that receives encrypted intents from the client. It performs validation and rate-limiting, then forwards the encrypted payload to the Orchestrator. The Relay does not possess decryption keys for intents.

2. Orchestrator

The Orchestrator is the core coordination component. It:
  • Verifies the user signature.
  • Decrypts the intent.
  • Plans execution (e.g., chunk scheduling for Stealth Mode).
  • Selects an Executor Wallet.
  • Monitors the chain for settlement.

3. Executor Wallets

Executor Wallets are hot wallets operated by CLOAK. They submit swap transactions to Solana. Because they are separate from the user wallet, they break the direct on-chain link between the user address and the swap.

4. Escrow Program

For Stealth Sells, assets are locked in a non-custodial Anchor program. User funds are only withdrawable by an authorized executor with a valid Signed Intent, or returned to the user on cancellation.