Series Full book PDF 華語

SCDO Laboratory · TECH PR

UNIT 12

Series · Automated Contract Ledgers for AI Agents · Next-Gen Smart Payments

Bots × Blockchain: Agents On-Chain

Bots × Blockchain: Agents On-Chain

Agents, permission boundaries, ledger automation · Author Ying Willam Zhang

Welcome — download to study · PDF Series index
Disclaimer: This primer is for education only — not investment, legal, or tax advice.

12. Bots × Blockchain: agent commerce, HTTP 402, SCDO nests

SCDO Lab · Automated Contract Ledgers for AI Agents v2 · ZH (Traditional): 12-bots.md
How bots/agents hold keys, keep books, pay per call; Agent Ledger and ~1¢ settle nests.
Education only — not investment advice.


Learning goals

  1. Name the four needs of machine commerce: identity, permission bounds, auditable trails, micropayments.
  2. Explain self-held agent wallets and Agent Ledger anchors on Shard0.
  3. Describe HTTP 402 / x402 “pay then proceed” in your own words.
  4. Spot volume illusions: volume × price ≠ real demand.
  5. Separate settle nests (identity/heartbeat) from 402 pay gates—and from casino lobbies.

Why bots × chains? — motivation in brief

Scripts have long crawled, traded, and operated systems. When agents hire each other, call APIs per request, and exchange data, chat promises fail. You need identity, caps, audit trails, and fees cheap enough for machine prices.

On-chain and adjacent rails push machine commerce toward checkable records. Same storyline as Chapter 10 (Agent Ledger) and Chapter 13 (payments), different slice.

Agent commerce map


Self-held wallets and ledgers

One key per agent: sign tasks/heartbeats; digests can anchor on SCDO Shard0. Agent Ledger is the public bookkeeping surface (see Ch. 10). Keys stay on-device per product docs.

Why self-held?

Handing agent seeds to “operators” buys convenience and blurs blame when logic bugs, ops mistakes, or key leaks collide. Educational default: agent keys = production credentials, closer to SSH keys than to marketing “smart vaults.”

Self-held keys

Identity registries (high level)

Public materials often pair on-chain identity registration (e.g. ERC-8004-style registries) with Agent Ledger: identity names the agent; the ledger anchors signed batches. Follow then-current official docs.


HTTP 402 and x402

HTTP 402 Payment Required is the old “pay to proceed” idea; modern x402 practice wires it to stablecoin per-call pay (SCDO pilots often USDC on Base). Fits API calls and agent-to-agent micros—not one-shot buyouts.

Typical flow (educational)

  1. Client/agent requests a protected resource.
  2. Server returns 402 with how to pay (asset, network, amount, payee—per live protocol).
  3. Client pays and retries.
  4. Server checks payment proof / chain state and unlocks.

This splits monthly subscriptions into per-call micros—natural for high-frequency agents—and adds issuer, bridge, RPC, and quota assumptions (Chapter 13).

402 paywall


Trading rails and volume illusions

Bots can market-make, arb, crawl—and fake volume. When you see volume × unit price, ask: real demand or wash? Same controller on both sides? Verifiable heartbeats/identity, or only exchange screenshots?

SCDO stresses verifiable heartbeats/identity; washed volume is not success. Lab self-test traffic ≠ paying customers—if a trust page says early mainnet paying customers were none or only self-tests, read it literally.

Honest volume reading


SCDO settle nest (~1¢ intuition)

Think of high-frequency micro-settlement as a nest: identity + signed heartbeat + optional pay routes. Router/node scdo_ledger-style packs are identity/heartbeat settle-nests, not a casino lobby and not x402 itself. ~$0.01 is the intuition: machine commerce must be cheap enough to run.

Three terms

Term Educational meaning
Agent Ledger Agent books and anchors (who signed; can batches be checked)
settle nest Thin nest of identity + heartbeat (+ optional routing)
x402 / 402 gate Per-call pay-to-unlock protocol intuition

Do not mash them into one “print money” button.

1¢ nest


Permissions, caps, revocability

  1. Signing/heartbeats before payments.
  2. Per-tx and daily caps; allowlisted hosts/contracts.
  3. Revocable API keys and agent grants; a kill switch when keys leak.
  4. Separate testnet vs mainnet; lab self-tests vs external customers.
  5. Never hand agent seeds to third-party “operators.”
  6. Decide in advance which log/anchor fields you will audit after an incident.

Bot rules

Mini case (teaching fiction)

A summarizer agent charges about 1¢ per internal API call. Engineers first prove heartbeats and signatures in a test environment, set a tiny daily cap, then attach a pilot pay gate. Week one only verifies “reject unpaid / accept paid”—no revenue dashboard theater.


Short quiz

  1. Name the four machine-commerce needs.
  2. How does a settle nest differ from x402?
  3. Why can huge volume still be an illusion?
  4. Why heartbeats before payments?

Sketch: (1) Identity, permissions, trails, micros. (2) Nest ≈ identity/heartbeat; 402 ≈ pay gate. (3) Wash trades / no real demand. (4) Prove control plane before spending power.


Takeaways


Chapter wrap

Next: payments, stablecoins, and the settle shell.

(Chapter 12 · Bots · SCDO Lab)