Skip to content
Calldata Pipeline

Pipeline Overview

The x0x1 calldata pipeline turns natural language intents into broadcast-ready transactions in 7 stages — routing through templates, recipe DB, or on-chain discovery with Anvil simulation.

The verification gate produces portfolio-ready positions. This pipeline turns those positions into signed-and-verified calldata. Every TX is simulated on an Anvil fork with full state diff before signing.

The AI agent orchestrates the pipeline but never builds calldata itself. Scripts perform all deterministic work. The agent parses intent, executes scripts, interprets results, and retries with corrected recipes on failure.

The 7-stage pipeline

1 UNDERSTAND Parse NL → structured JSON only LLM stage 2 LOOKUP Templates / DB / Discovery 3 ASSEMBLE Build calldata from recipe 4 SIMULATE Anvil fork + state diff 5 APPROVE User reviews state diff 6 SIGN Air-gapped device 7 VERIFY Post-sign replay → broadcast ← DETERMINISTIC ← HUMAN ACTION ← POST-EXECUTION

Three routing paths

Stage 2 (LOOKUP) tries three paths in order. Express path uses direct contract calls that can build calldata for common DeFi actions; Recipe is our own database of deterministic templates; Discovery learns new recipes from on-chain transactions:

E
Express
Direct contract calls with verified templates. Agent verifies decoding.
R
Recipe
Recipe exists in tx.db. SQL lookup + parameter binding. No LLM. Pure template.
D
Discovery
No recipe, no template. Fetch real TXs from Etherscan, decode, classify, write new recipe.
The Discovery path is the self-healing loop: every failed transaction teaches the system a new recipe pattern. Recipes accumulate — the system gets smarter over time.

4-database model

The pipeline reads from and writes to four SQLite databases. Schema details: architecture page.