How Execution Works

Xecute uses a deterministic application-layer execution pipeline to validate supported actions, verify live state, simulate transactions, estimate gas, enforce safeguards, and require explicit wallet confirmation. This prevents free-form model output from being used directly as wallet calldata.

The execution model: AI interprets intent. Deterministic application code validates structured parameters and constructs supported actions. Live state and simulation inform pre-flight checks. The user provides final authority through the wallet. The blockchain provides final settlement.

The 10-Step Execution Lifecycle

01

Natural-Language Input

User Interface

The user submits a conversational prompt in plain English (e.g. "Swap 25 USDT to OKB with 0.5% max slippage").

02

AI Intent Interpretation

Intent Engine

Hybrid model orchestration (DeepSeek V4 / Gemini 3.7 Flash) extracts parameters: action, assets, amounts, slippage tolerance, and target network.

03

Strict Schema Validation

Zod Validation

Parameters are validated against strict Zod schemas (TradeIntentSchema, ProtectIntentSchema) to enforce complete data types.

04

Capability Adapter Routing

Capability Router

The validated intent is routed to the corresponding deterministic adapter (TestnetSwapAdapter, TransferAdapter, ApprovalAdapter).

05

Execution Preview Render

Preview UI

Renders an interactive execution preview card with estimated Pay/Receive balance deltas, route details, and parameter tuning.

06

Human Confirmation Trigger

Human-in-the-Loop

The user explicitly clicks the confirmation button on the execution card to initiate live transaction preparation. No action executes autonomously.

07

Live Onchain State Verification

JSON-RPC

Xecute queries X Layer JSON-RPC for real-time wallet balances, token decimals, and existing allowance permissions immediately prior to execution.

08

Pre-Flight Safeguard Checks

Safety Policy

Enforces deterministic policies: gas reserve protection (≥ 0.005 OKB), slippage ceiling (≤ 5%), EVM address verification, and distinct asset rules.

09

Transaction Simulation & Gas Estimation

Pre-Flight Dry Run

Simulates transaction execution against observed chain state and estimates gas with safety buffers to help detect likely reverts or execution problems against the currently observed state before signing.

10

Wallet Signature & Settlement

X Layer Testnet

The user reviews and signs the transaction in their connected Web3 wallet (MetaMask, OKX Wallet) and the receipt is verified on X Layer Testnet.