x0x1 system architecture: 6 design principles, 7-layer topology from on-chain reads to user interface, 4-database model, and the 12-stage side-effect pipeline for every blockchain interaction.
The overview introduced what x0x1 does. This page covers how it's built:
the constraints that govern every design decision, the layer topology, and the pipeline that
processes every blockchain interaction.
Design principles
Every design decision traces back to these. They are enforced in code, not in documentation:
Business constraints enforced programmatically. The agent cannot bypass TVL floors, exploit checks, or approval limits.
03
Intent staging
Natural intent → typed proposal → executable action. Every transformation is auditable.
04
Halt over guess
Uncertainty = hard stop with reason code. No fallback heuristics.
05
Determinism ratchet
Capabilities migrate unidirectionally from agent to deterministic code. One-way evolution.
06
Defense in depth
Multiple independent validation layers. No single point of failure in the security model.
7-Layer Topology
Seven layers, strict responsibility boundaries:
4-Database Architecture
All state is stored in SQLite databases, each with a single responsibility:
raw.db
Protocol docs, ABIs, raw TXs
docs, abis, raw_txs
tx.db
Contracts, selectors, recipes
contracts, selectors, recipes, recipe_params
portfolio.db
Wallets, positions, NAV
wallets, positions, nav_history
journal.db
Scenarios, execution log
scenarios, journal, outcomes
Databases are append-mostly. Recipes accumulate over time through the self-healing loop —
every failed transaction teaches the system a new pattern.
12-Stage Side-Effect Pipeline
Every action that touches the blockchain goes through a 12-stage pipeline. No shortcuts, no skipping.
Stages 1–4 are research and validation. Stages 5–6 are deterministic assembly.
Stages 7–8 require human action. Stages 9–12 are post-execution verification
and record-keeping.