The clearinghouse for
the agentic economy

Infrastructure for your agent to transact on instant programmable credit, earn yield, and settle at once.

The real cost

Agentic economy breaks at scale.

1M API calls, 10k USDC volume, 1 year.

x402

per-transaction settlement

Capital locked in wallet

earns 0%, just sitting there

$10,000 USDC

Yield earned

no yield mechanism

$0

Gas fees paid (1M on-chain txs)

~$0.001 × 1,000,000 settlements

+$1,000 USDC

Time waiting for finality

1M txs × ~1 s avg block time

278 hours
Total cost$11,000 USDC

With 4Mica

credit layer + batch settlement

Capital deployed in Aave vault

non-custodial · withdraw anytime

$10,000 USDC

Yield earned over 1 year

~5% Aave USDC APY

+$500 USDC

Gas fees

batch + netting · sponsored · $0 for payer

< $1

Time waiting for finality

10ms BLS signature + verification per request

2.7 hours
Net cost$9,500 USDC

Same 1M calls. Same starting capital.

$1,500 saved·275.3 hours reclaimed

How it works

Separate payment authorization from settlement

Pay with programmable cryptographic credit. Settle thousands of payments in one on-chain transaction.

01Deposit

Deposit collateral once

Funds go into Aave and earn yield. One collateral covers all credit.

Deposit
await client.user.approveErc20(usdc.address, AMOUNT);
await client.user.deposit(AMOUNT, usdc.address);
02Spend

Spend on credit: instant, off-chain

Agent authorizes an EIP-712 guarantee claim, gets a BLS signature credit. No gas, no chain transaction. Verified in milliseconds.

Spend
const payment = await signGuarantee({
cycleId: "0xabc",
reqId: "0x0",
amount: "0x64",
recipient: "0x72e1…ResourceHub",
});
// GET /resource
// X-PAYMENT: <base64(payment)>
// HTTP 200 OK
03Netting

Netting across the cycle

Every 7 days the cycle closes. Bilateral flows collapse into one net position per participant.

Netting
// Cycle closes every 7 days, netting begins
// Bilateral edges this cycle:
Alice → Bob: 800 USDC (40 guarantees)
Bob → Alice: 300 USDC (15 guarantees)
// net_debit[Alice] = max(800 - 300, 0) = 500 USDC
// net_credit[Bob] = 500 USDC
// 55 guarantees turns into 1 net position per participant
04Settle

Settle on-chain, one net payment

Net debtors pay once. Creditors claim once. Defaults are covered by vault collateral.

Settle
// Debtor pays net position to ClearingHouse
await clearingHouse.payNetDebit(
cycleId,
netDebit, // 500 USDC — not 800
merkleProof,
);
// Creditor claims once debtor has paid
await clearingHouse.claimNetCredit(
cycleId,
netCredit,
merkleProof,
);
// 55 off-chain payments → 1 on-chain settlement

Replace thousands of transactions with one net settlement per cycle

Same x402 protocol. Same HTTP clients. Add 4Mica to scale.

Use cases

Built for the scale you need

From autonomous agents to financial infrastructure — 4Mica handles the payment layer so you don't have to.

AI Agents

Autonomous agent subscriptions

An AI agent calls dozens of APIs per task — data feeds, inference endpoints, storage. 4Mica lets it pay on credit from one pool and settle net exposure once per epoch.

Off-chain executionPer-request paymentAuto-settlement
Agentic Commerce

Agent-to-agent micropayments

When agents transact with each other at high frequency, on-chain settlement per call is unworkable. 4Mica natively nets bilateral flows and collapses them into one settlement.

Agent-to-agentBilateral nettingHigh-frequency
APIs / Pay-per-request

HTTP API monetization at scale

Charge per API call using standard x402 headers — no SDK required on the client side. Works with existing HTTP clients. Add 4Mica middleware to enable credit and batch settlement.

x402-compatibleAny HTTP clientInstant verification
Financial Infrastructure

Clearinghouse for on-chain apps

Build a payment rail that aggregates millions of micro-transfers, earns yield on float, and settles net positions on-chain. The same primitive banks use — but permissionless.

Yield on floatProgrammable disputesNon-custodial

Ecosystem

Built on primitives you already trust

4Mica is not a new protocol stack. It is a credit layer on top of production infrastructure.

x402Payment protocol

The HTTP payment standard 4Mica extends with a credit layer. Any x402-compatible client works out of the box.

AaveYield layer

All collateral routes directly to Aave. Deposits earn APY continuously — your payment infrastructure generates return.

Ethereum / BaseSettlement layer

Net positions settle on-chain via EVM-compatible contracts. One transaction per settlement window, cryptographically enforced.

Non-custodial

You own your collateral. 4Mica never holds funds.

Open-source core

Contracts and SDKs are public on GitHub.

Testnet live

Deposit, spend, and earn on Sepolia today.

Teams building on 4Mica

Aligned LayerChaosChainWachai

Integration

3 lines to enable credit-based payments

Works with your existing HTTP client. No contract changes. No new wallet. Fully x402-compatible.

Works with existing HTTP clients
No contract changes required
x402-compatible by default
agent / client · typescript
1import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
2import { FourMicaEvmScheme } from "@4mica/x402/client";
3import { privateKeyToAccount } from "viem/accounts";
4
5// 1. Create your account
6const account = privateKeyToAccount("0xYourPrivateKey");
7// 2. Register the 4Mica credit scheme
8const scheme = await FourMicaEvmScheme.create(account);
9// 3. Wrap your existing fetch — that's it
10const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
11 schemes: [{ network: "eip155:84532", client: scheme }],
12});
13
14// Now every request is credit-based — no gas, no chain
15const response = await fetchWithPayment("https://api.example.com/data");
Full docs at /resources/technical-docsSDKs: TypeScript · Python · Rust soon

Security

Plain UX, hard guarantees

The protocol is designed so that trust is enforced by math and contracts — not by 4Mica.

Non-custodial by design

Your collateral is in Aave. Your guarantees are on-chain. 4Mica is the coordination layer — it cannot move your funds.

Collateral stays in Aave

Deposits go directly to Aave — not to 4Mica. Users can withdraw at any time. 4Mica never holds funds.

BLS-signed guarantees

Every payment is backed by an EIP-712 signed guarantee with domain separation. Cryptographic proof exists for every spend.

On-chain enforcement

If a payer defaults, recipients claim collateral directly from the contract. No trusted intermediary. No custodian risk.

AccessManaged + Pausable

Role-based access control, emergency pause, and reentrancy guards on all critical contract flows.

FAQ

Common questions

What exactly is a credit layer for x402?

Standard x402 settles every payment on-chain, one transaction per request. 4Mica adds a credit layer: agents sign off-chain guarantees and spend against pooled collateral. Settlements are batched and happen once per window — orders of magnitude fewer transactions.

What is a payment tab?

A tab is a credit session opened by the recipient (POST /tabs). It has a tabId, TTL, and version. Individual spends within the tab are identified by a reqId that increments with each signed guarantee.

What is a payment guarantee?

An EIP-712 signed claim the payer attaches as an X-PAYMENT header. It commits to tabId, reqId, amounts, addresses, and timestamp. The facilitator verifies the signature and issues a BLS-signed certificate for on-chain settlement.

How does yield work?

Stablecoin deposits route through Aave via depositStablecoin(). The protocol holds aTokens on your behalf. APY accrues continuously and offsets the cost of payments.

When do users settle?

Users call payTabInERC20Token() after 7 days. If they don't, the recipient's on-chain claim window opens at day 14 (remunerationGracePeriod) and closes at day 21 (tabExpirationTime).

How are disputes handled?

V2 guarantees use ERC-8004's ValidationRegistry. The payer signs a guarantee committing to a specific validator, agent, score threshold, and job hash. If the validation fails on-chain, remunerate() reverts and collateral stays locked. Validators post a 0–100 score on-chain.

How do withdrawals work?

Call requestWithdrawal() to start the timelock, then finalizeWithdrawal() after the withdrawalGracePeriod (default 22 days). A 6-hour synchronizationDelay prevents race conditions with open tabs.

Which assets are supported?

ETH and stablecoins. USDC and USDT are enabled by default. Other ERC-20s can be configured by the operator.

Does it work with existing x402 clients?

Yes. 4Mica is x402-compatible. Wrap your existing fetch or requests client with the 4Mica scheme adapter — one line of code. No changes to your server or HTTP logic.

Start building

Stop paying per transaction.

Add a credit layer. Batch thousands of payments. Settle once. Your collateral earns yield while your agents scale.

1 tx

settlement

~0

gas per call

APY

on collateral