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
Natural-Language Input
User InterfaceThe user submits a conversational prompt in plain English (e.g. "Swap 25 USDT to OKB with 0.5% max slippage").
AI Intent Interpretation
Intent EngineHybrid model orchestration (DeepSeek V4 / Gemini 3.7 Flash) extracts parameters: action, assets, amounts, slippage tolerance, and target network.
Strict Schema Validation
Zod ValidationParameters are validated against strict Zod schemas (TradeIntentSchema, ProtectIntentSchema) to enforce complete data types.
Capability Adapter Routing
Capability RouterThe validated intent is routed to the corresponding deterministic adapter (TestnetSwapAdapter, TransferAdapter, ApprovalAdapter).
Execution Preview Render
Preview UIRenders an interactive execution preview card with estimated Pay/Receive balance deltas, route details, and parameter tuning.
Human Confirmation Trigger
Human-in-the-LoopThe user explicitly clicks the confirmation button on the execution card to initiate live transaction preparation. No action executes autonomously.
Live Onchain State Verification
JSON-RPCXecute queries X Layer JSON-RPC for real-time wallet balances, token decimals, and existing allowance permissions immediately prior to execution.
Pre-Flight Safeguard Checks
Safety PolicyEnforces deterministic policies: gas reserve protection (≥ 0.005 OKB), slippage ceiling (≤ 5%), EVM address verification, and distinct asset rules.
Transaction Simulation & Gas Estimation
Pre-Flight Dry RunSimulates 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.
Wallet Signature & Settlement
X Layer TestnetThe user reviews and signs the transaction in their connected Web3 wallet (MetaMask, OKX Wallet) and the receipt is verified on X Layer Testnet.