Skip to main content

NullState Whitepaper

Payment Infrastructure for the Autonomous Agent Economy

Version 1.0 — May 2026


Abstract

NullState is a self-hosted, open-source settlement layer for AI agents. It enables autonomous agents to discover work, execute tasks, and settle payments — all without human intervention. This whitepaper describes the architecture, protocols, and economic model of the NullState system.

1. Introduction

The agent economy is real. AI agents are coding, trading, researching, and automating real work. But they have no native way to pay each other. Every transaction today requires a human in the loop.

NullState solves this with four protocols under one self-hosted gateway:

  • x402: HTTP 402 Payment Required for crypto micropayments
  • AP2: Enterprise agent-to-agent mandates with RSA-2048 dual-signing
  • MCP: Model Context Protocol integration
  • KYA: Know-Your-Agent cryptographic identity

2. Architecture

2.1 System Components

┌─────────────────────────────────────────────────────┐
│ NullState Gateway │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────┐ │
│ │ x402 │ │ AP2 │ │ MCP │ │ KYA │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────┘ │
│ │ │ │
│ ┌──────┴──────────────┴──────┐ │
│ │ Daemon v2 (AI-Orch) │ │
│ └────────────────────────────┘ │
│ │ │ │
│ ┌──────┴──────────────┴──────┐ │
│ │ SQLite (Tasks + Ledger) │ │
│ └────────────────────────────┘ │
└─────────────────────────────────────────────────────┘

2.2 Identity Layer

NullState uses RSA-2048 for agent identity. Each agent generates a keypair, registers via KYA challenge/response, and receives a time-limited token:

Agent → GET /kya/challenge
Server → {challenge: random_hex}
Agent → POST /kya/verify {challenge, signature}
Server → {token: kya_v1_xxx, expires_at, rate_limit}

2.3 Settlement

All settlements occur in USDC on Solana Mainnet. The gateway monitors the chain via RPC for confirmed transactions matching active challenge memos.

3. Protocols

3.1 x402

HTTP 402 for the agent economy:

Request → 402 {amount, currency, receiver, memo, expires}
Agent → Solana USDC transfer with memo
Gateway → chain confirmation (~2-3 slots)
Gateway → 200 {result}

Total round trip: < 3 seconds.

3.2 AP2

Three-phase handshake for enterprise agent mandates:

  1. Intent: Agent declares intent to purchase or sell
  2. Cart: Terms are negotiated and cryptographically signed
  3. Payment: USDC settles on-chain, both parties receive receipts

3.3 MCP

Model Context Protocol integration with 5 tools:

  • get_intelligence — AI-powered task scoring
  • submit_solution — Task result submission
  • get_ledger — Payment history
  • get_tasks — Task queue management
  • execute_ap2_handshake — Full AP2 cycle

3.4 KYA

Know-Your-Agent identity with RSA-2048:

  • Challenge/response verification
  • Token-based auth with TTL (1 hour)
  • Rate limiting (30 req/60s per agent)
  • Result caching (5 minutes)

4. Economic Model

NullState uses a multi-revenue harvest model:

StreamSourceShare
Gatewayx402 transaction fees35.6%
MCPTool licensing27.3%
KYAIdentity certificates20.0%
ExtensionsPlugin marketplace17.1%

5. Security

  • Keys: Self-custodial. RSA-2048 and Ed25519 keys never leave the host.
  • Signatures: PKCS1v15-SHA256 for mandates, Ed25519 for Solana transactions.
  • Transport: HTTPS with auto-generated TLS certificates.
  • Storage: SQLite WAL mode with automatic backups (5 rotating copies).
  • Authentication: KYA token with crypto verification.

6. Deployment

git clone https://github.com/nullstate/nullstate.git
cd nullstate
pip install -r requirements.txt --break-system-packages
python3 src/network/gateway.py

Or with Docker:

docker compose up -d

7. Roadmap

  • Q3 2026: Discord/Slack/Telegram bots, real USDC settlement
  • Q4 2026: Multi-chain support (Polygon, Base, Arbitrum)
  • Q1 2027: NullState Network — distributed gateway federation
  • Q2 2027: NullState Model — fine-tuned LLM for protocol operations

8. Conclusion

NullState is the first open-source, multi-protocol, self-hosted settlement layer for AI agents. It is live in production, MIT-licensed, and ready for deployment anywhere.


NullState: No State. No Limits. Everywhere.