Architecture

Architecture

Overview

y0.exchange is a non-custodial AI-to-Blockchain infrastructure platform. The core architecture ensures that y0 never holds, stores, or accesses user private keys.

┌─────────────┐     ┌──────────────┐     ┌───────────────────┐     ┌──────────────────┐     ┌──────────────┐
│  AI Agent    │────>│  MCP Server  │────>│  Signing Service   │────>│  y0 App          │────>│  User Wallet │
│  (Claude,    │     │  (y0-mcp)    │     │  (tx builder +     │     │  (app.y0.exchange │     │  (MetaMask,  │
│   GPT, etc.) │     │              │     │   approval queue)  │     │   or mobile app)  │     │   Phantom…)  │
└─────────────┘     └──────────────┘     └───────────────────┘     └──────────────────┘     └──────────────┘
                           │                       │                        │                       │
                     Builds unsigned          Queues tx,              User reviews tx        Signs & broadcasts
                     tx request               sends push              details in app         to blockchain

Signing Flow (Step by Step)

  1. AI agent calls a write tool (e.g. swap, send) via MCP protocol
  2. MCP server validates parameters, fetches quote/route, builds an unsigned transaction
  3. Signing Service receives the unsigned tx, assigns a txId, stores it in approval queue with status pending
  4. Notification Router sends a push notification to the user’s device (push / WebSocket / Telegram)
  5. y0 App (app.y0.exchange or the y0 mobile app) displays transaction details in human-readable form:
    • What: “Swap 1.5 ETH → 3,200 USDC on Uniswap”
    • Estimated gas: “$2.40”
    • Expiration: 5 minutes
  6. User reviews and approves — the y0 app calls the user’s wallet (MetaMask, Phantom, Trust Wallet) to sign the transaction
  7. Signed transaction is broadcast to the blockchain from the user’s device
  8. MCP server receives the tx hash and returns result to the AI agent

What y0 Servers Know vs Don’t Know

y0 servers KNOWy0 servers NEVER know
Wallet public addressPrivate keys
Unsigned transaction dataSeed phrases
Transaction status (pending/done)Wallet passwords
Token balances (public on-chain data)Signing credentials
Gas estimatesPrivy MPC key shards

Approval Model

Every transaction requires full review — manual review and explicit approval by the user.

StepWhat happens
NotificationAI proposes a transaction. User receives a push notification or sees it in the approval queue.
ReviewUser sees every detail: token, amount, recipient, gas estimate, risk level.
Approve or RejectUser approves to sign in their wallet, or rejects to discard. No transaction executes without explicit confirmation.

Open Core Licensing

ComponentLicenseRationale
MCP ServerMITCore AI integration, must be auditable
JS/TS SDKMITClient library
Python SDKMITLangChain/AutoGPT ecosystem
Signing UIMITUsers must verify what they sign
Signing ServiceProprietaryCore product value
Notification RouterProprietaryManaged infrastructure
AI AssistantProprietaryPremium B2B feature

Components

MCP Server (@y0exchange/mcp)

npm package that exposes y0 as tools for AI agents via the Model Context Protocol. Supports stdio and HTTP transports. Source code: github.com/y0exchange/mcp.

  • 6 read-only tools
  • 2 write tools (swap, send); bridge and approve coming soon
  • All 8 tools available for free
  • MIT-licensed

Signing Service

REST API + WebSocket server that builds unsigned transactions and manages the approval queue.

  • Fastify + PostgreSQL + Drizzle ORM
  • Transaction builders: swap (0x/1inch), send, bridge (LI.FI), approve
  • WebSocket notifications for real-time approval
  • 5-minute configurable timeout

Signing UI

React components for transaction review and signing. Embedded in the web app, mobile app, and Telegram Mini App.

  • Transaction detail display
  • Approve / Reject buttons
  • Wallet provider integration (Privy, Reown, MetaMask)
  • MIT-licensed