Architecture
How HoodLayer is structured, from the HTTP handshake layer down to Robinhood Chain mainnet.
HoodLayer breaks down into five layers. Each one has a single job, and you can make sense of any of them on its own before looking at how they fit together.
The five layers
| Layer | Responsibility |
|---|---|
| Protocol Layer | The x402 and MPP HTTP handshake. Covers how agents and services negotiate payment. |
| Settlement Layer | Robinhood Chain mainnet, using standard ERC-20 tokens (USDC, USDT). Near-instant sequencer confirmation, fees under a cent. |
| Contract Layer | HoodLayer’s Solidity contracts covering subscription delegation, the plan registry, and session management. |
| Facilitator Layer | The nodes that check payment headers and kick off on-chain settlement. |
| SDK Layer | TypeScript libraries that reduce everything above to hoodlayer.pay() and hoodlayer.subscribe(). |
Request flow
Here’s what happens the first time an agent requests a paid resource.
Agent
|
| 1. GET https://api.example.com/v1/data
v
Service Provider API
|
| 2. 402 Payment Required
| X-HoodLayer-Payment: { plan, amount, token, network, ... }
v
Agent + HoodLayer SDK
|
| 3. Reads payment terms
| Signs delegation or transfer via wallet
v
HoodLayer Facilitator
|
| 4. Verifies authorization on-chain
| Executes or schedules transfer via the HoodLayer contracts
| Returns confirmation header
v
Service Provider API
|
| 5. Validates confirmation
| 200 OK + requested resource
v
Agent
Once a subscription is active, later requests skip steps 2 through 4. The service checks the subscription on-chain itself and serves the resource right away.
Protocol Layer
The Protocol Layer handles negotiation at the HTTP level. HoodLayer implements the x402 specification: when an unauthenticated request comes in, the service returns a 402 Payment Required status along with a structured payment object in the response headers. The agent parses those terms and answers with a signed payment or subscription authorization.
The payment header schema is also written so that MPP-compliant agents can parse it. MPP routes to Stripe/Tempo infrastructure; HoodLayer routes to Robinhood Chain instead. An agent can use HoodLayer endpoints without touching its code, since only the network field in the payment object differs.
Settlement Layer
Every movement of value happens on Robinhood Chain mainnet. HoodLayer relies on the standard ERC-20 token interface, and USDC is the main payment token during beta. Robinhood Chain is an Arbitrum Orbit Ethereum L2 targeting ~100ms block times: sequencer confirmation is near-instant, full finality comes when the batch settles on Ethereum, and fees stay well under a cent per transaction, so the chain handles rapid per-request payments and tiny metered charges without breaking a sweat.
There is no separate HoodLayer ledger. Plans, subscriptions, allowances, and payments all exist as publicly readable contract records on Robinhood Chain. The chain itself is the ledger.
Contract Layer
The core on-chain logic is HoodLayer’s own open-source contracts, written in Solidity 0.8 with OpenZeppelin, deployed on Robinhood Chain. The HoodLayer Subscriptions contract lives at 0xde1e6a7e615c023c014171bc46cc764cedcf1df6; an external security audit is planned before the beta exits. Alongside subscriptions, the contracts provide:
- HoodLayer Plan Registry: an on-chain catalog of pricing plans published by service providers. A plan can’t change once it exists, so subscribers keep their original terms even after the provider ships a newer one.
- Subscription records: on-chain records tying an agent wallet to a plan, along with status, billing cycle, and the authorized amount.
- Allowance records: on-chain spend caps used for metered or one-time billing, with the running total visible to anyone.
Facilitator Layer
The Facilitator is the off-chain piece that does the mechanical work of checking payment headers and triggering settlement on-chain. While HoodLayer is in beta, the Facilitator runs as a centralized service that HoodLayer operates. That centralization is stated openly, and the roadmap calls for a permissionless Facilitator Network where anyone who stakes collateral can run a facilitator node.
Payment Session tokens for high-frequency agents also come from the Facilitator. A session token covers a burst of requests against a balance the agent commits up front. The underlying on-chain settlements get batched, which pushes per-request latency close to zero without giving up full on-chain auditability. Payment sessions arrive with general availability.
SDK Layer
The SDK hides all of this. To make a first payment, an agent developer never has to think about x402 headers, the on-chain contracts, or talking to a facilitator. Install @hoodlayerorg/sdk, set up a HoodLayerAgent with a wallet, then call agent.pay() or agent.subscribe().
The full API is covered in the Agent SDK and Provider SDK references.
On-chain transparency
All state lives on Robinhood Chain, so anyone can check any payment or subscription without taking HoodLayer’s word for it. That’s a core design principle. HoodLayer does provide block explorer integration and an indexed event log, but neither one gates anything. The chain stays the authoritative source.