The clearing house for the agentic economy

4Mica gives agents one place to pay on credit, earn yield, and settle transactions without clearing every request on-chain.

Supported on Base Mainnet, Base/Ethereum Sepolia Testnets

The real cost

Agentic payments break 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 saved275.3 hours reclaimed

How it works

Separate payment authorisation from settlement

Pay with programmable cryptographic credit. Payment clearing runs off-chain, so thousands of API payments settle in one on-chain transaction.

01Deposit

Deposit collateral once

Funds go into Aave and earn yield. A single collateral deposit covers all credit.

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

Spend on credit: instant, off-chain

The agent signs an EIP-712 guarantee claim and receives BLS-signed credit. No gas, no chain transaction. Verified in milliseconds.

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.

// 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 turn into 1 net position per participant
04Settle

Settle on-chain with one net payment

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

// 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

Same x402 protocol. Same HTTP clients. Works with any x402 facilitator.

Replace thousands of transactionsone net settlement per cycle

Use cases

Built for the scale you need

Built for x402 facilitators first, then the API providers and agent frameworks behind them. 4Mica runs the credit and clearing layer.

AI Agents

Agents pay APIs on credit, settle once

An AI agent calls dozens of endpoints per task: data feeds, inference, storage. No account setup, no API keys. It pays on credit from one pool and settles net exposure once per epoch.

No account setupInstant onboardingAuto-settlement
Agentic Commerce

Agent-to-agent micropayments at scale

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
API Monetisation

Accept payments with one line of code

Add 4Mica middleware and charge per HTTP request. It works with any x402-compatible client. No SDK on the client side, no KYC, no credits to manage. Money moves at the speed of the internet.

x402-compatibleAny HTTP clientZero friction
Financial Infrastructure

Clearing house for on-chain apps

Build a payment rail that aggregates millions of micro-transfers, earns yield on float, and settles net positions on-chain. It uses the same primitive as banks, but without requiring permission.

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

4Mica adds a credit layer to the x402 HTTP payment standard. Any x402-compatible client works out of the box.

AaveYield layer

All collateral routes directly to Aave. Deposits continuously earn a variable APY, allowing your payment infrastructure to generate returns.

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

Trusted by fast-growing companies around the world.

Aligned Layer logoChaosChain logoWachai logoClawCash logoLambda Class logo

Integration

3 lines to enable credit-based payments

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

agent / client · typescript
import { FourMicaEvmScheme } from "@4mica/x402/client";
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

// 1. Create your account
const account = privateKeyToAccount("0xYourPrivateKey");
// 2. Register the 4Mica credit scheme
const scheme = await FourMicaEvmScheme.create(account);
// 3. Wrap your existing fetch. That's it.
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:84532", client: scheme }],
});

// Now every request is credit-based. No gas, no chain.
const response = await fetchWithPayment("https://api.example.com/data");
SDKs are availableAvailable now in TypeScript & Python · Rust coming soon

FAQ

Common questions

Yes, as long as the client and server can register the 4mica-credit scheme. Buyers add the scheme adapter to the fetch wrapper they already use; sellers configure their x402 middleware to advertise and verify it. You do not need to change your HTTP logic.

ETH and the ERC-20 tokens enabled by the active Core deployment. USDC and USDT are the defaults where enabled, and operators can configure others. A route only accepts the asset it advertises, so check the deployment's token list before going live.

Configured stablecoin collateral is supplied to Aave, and the protocol holds the interest-bearing aTokens. Collateral keeps accruing while capacity is reserved for guarantees, and the yield belongs to the collateral position — the payer — not the seller. Yield is variable and not guaranteed, so verify the current deployment configuration before depositing production funds.

It is the layer between authorising a payment and moving money. Instead of a transfer per request, buyers sign collateral-backed guarantees that are batched into clearing cycles. A cycle accepts guarantees, closes, computes net positions, and commits those positions on-chain — the same job a clearing house does for traditional payments.

Standard x402 turns every request into its own on-chain transfer. 4Mica's 4mica-credit scheme authorises the request against collateral-backed credit and settles later, so requests clear off-chain in one round trip and only net positions ever move on-chain.

x402 facilitators first: adding the 4mica-credit scheme lets every seller behind your endpoint take credit-backed payments, with 4Mica running as the clearing layer behind your brand. Then API and service providers who want to charge per request without accounts, invoices, or prepaid balances, and agent frameworks that want paid tool use built in. The fit is high-volume, low-value payments where checkout and invoicing infrastructure is the bottleneck.

Authorisation is separated from settlement. For each request, there is an off-chain signature and a Core verification — no chain write, no gas. Payable guarantees then enter a clearing cycle and settle as net positions: 40 outgoing and 27 incoming guarantees become a single net debit of 13, so one movement replaces 67. Netting changes settlement movement, not payment history — every individual record stays intact.

Yes. Base (eip155:8453) is the production network. Base Sepolia (eip155:84532) is the development network and Ethereum Sepolia (eip155:11155111) is there for cross-network compatibility testing. We recommend building against Base Sepolia first and moving to mainnet once your flows are tested.

Existing x402 facilitators add the 4mica-credit scheme to their /supported response, call Core from their settle logic to submit guarantees and return the BLS certificate, validate both V1 and V2 guarantee structures, and use CAIP-2 network identifiers. You can also point sellers at the hosted facilitator instead of running your own.

The buyer's signed commitment to pay a specific amount to a specific recipient. It binds payer, recipient, amount, asset, request ID, and timestamp, and travels with the request. Core verifies the signature and available collateral, then issues a BLS certificate — that certificate is what proves the guarantee was accepted.

Guarantees enter clearing cycles configured per deployment. A cycle accepts guarantees, closes, computes net positions, commits them on-chain, and opens the payment and finality windows. Check your deployment's parameters rather than assuming a fixed schedule.

V1 guarantees become payable once Core verifies them. V2 guarantees wait on a validation condition — a registry, validator, score threshold, and job hash committed in the signature — so payment is bound to an objectively verifiable outcome. 4Mica records signatures, certificates, lifecycle state, and settlement evidence; subjective quality, retries, and refunds stay a product policy decision.

Withdrawals are request-and-finalize with a delay in between. Finalization requires the configured grace period to pass and no obligations preventing it, so check open guarantees before withdrawing collateral. Durations are deployment parameters, not fixed constants.

Something else on your mind?Contact us

Start building

Stop paying per transaction.

Batch thousands of payments, settle once, and let your collateral earn yield while your agents scale.
1 txper settlement
~0gas per call
APYon collateral