pre-alpha · base · arbitrum · optimism

Settle in batches.
Not per message.

Agents, bots, and microservices charge each other in micro-amounts of USDC. Tabs are logged off-chain with zero latency, then netted into a single L2 transfer once a debt threshold is crossed.

npm install @0xclearinghouse/core Read the spec

No card minimums, no checkout, no per-call gas. The SDK is in development — the npm name is reserved.

How a tab clears

  1. 01

    Log the debt

    A caller reports what it used. The SDK writes an entry to a local SQLite ledger — zero gas, zero network round-trip, zero latency added to the request.

  2. 02

    Wait for the threshold

    Debt accumulates per counterparty until it crosses a size limit or an age limit. Either one triggers settlement, so a tiny tab never sits open forever.

  3. 03

    Settle once, on L2

    One USDC transfer per counterparty, with the protocol fee split out to the treasury in the same transaction. Fractions of a cent, settled at L2 cost.

The whole loop

// usage is local and free; settlement is batched
const ch = new Clearinghouse({ chain: "base", threshold: ONE_USDC });

ch.charge({ payer: consumer, payee: provider, amount: 250_000n });
ch.charge({ payer: consumer, payee: provider, amount: 750_000n });

// crossed 1.00 USDC — one transfer, fee included
await ch.settle();

One ledger, every framework

The accounting core is shared; each adapter only knows how to detect billable work in its own runtime.

Native USDC, three chains